论文标题

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

Code Search: A Survey of Techniques for Finding Code

论文作者

Di Grazia, Luca, Pradel, Michael

论文摘要

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

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源