当前位置: X-MOL 学术ACM Comput. Surv. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Code Search: A Survey of Techniques for Finding Code
ACM Computing Surveys ( IF 23.8 ) Pub Date : 2023-02-09 , DOI: 10.1145/3565971
Luca Di Grazia 1 , Michael Pradel 1
Affiliation  

The immense amounts of source code provide ample challenges and opportunities during software development. To handle the size of code bases, developers commonly search for code, e.g., when trying to find where a particular feature is implemented or when looking for code examples to reuse. To support developers in finding relevant code, various code search engines have been proposed. This article surveys 30 years of research on code search, giving a comprehensive overview of challenges and techniques that address them. We discuss the kinds of queries that code search engines support, how to preprocess and expand queries, different techniques for indexing and retrieving code, and ways to rank and prune search results. Moreover, we describe empirical studies of code search in practice. Based on the discussion of prior work, we conclude the article with an outline of challenges and opportunities to be addressed in the future.



中文翻译:

代码搜索:查找代码的技术调查

大量的源代码在软件开发过程中提供了大量的挑战和机遇。为了处理代码库的大小,开发人员通常会搜索代码,例如,当试图找到实现特定功能的位置或寻找要重用的代码示例时。为了支持开发人员查找相关代码,已经提出了各种代码搜索引擎。本文调查了 30 年的代码搜索研究,全面概述了挑战和应对这些挑战的技术。我们讨论了代码搜索引擎支持的查询类型、如何预处理和扩展查询、索引和检索代码的不同技术,以及对搜索结果进行排名和修剪的方法。此外,我们描述了代码搜索在实践中的实证研究。基于之前工作的讨论,

更新日期:2023-02-10
down
wechat
bug