一句话:指出传统代码搜索仅依赖文本相似度、缺乏语义理解,并指向深度代码搜索方向。
本文关注代码搜索问题:开发者常通过在大规模代码库中搜索来复用已有代码片段。现有代码搜索工具通常把源代码当作文本文档,使用信息检索模型返回与自然语言查询匹配的代码片段,因而主要依赖源代码与查询之间的文本相似度。作者指出这类方法缺乏对查询和源代码语义的深层理解,容易受表层词汇匹配限制。论文标题“Deep code search”表明其方向是引入深度语义理解来改进代码搜索,但所给摘要并未具体说明采用的深度模型、训练数据、检索流程或系统实现,也未报告评估基准、对比方法和实验结果。因此,该摘要的核心贡献在于提出问题与方向,方法和实证结果需参见论文全文。
To implement a program functionality, developers can reuse previously written code snippets by searching through a large-scale codebase. Over the years, many code search tools have been proposed to help developers. The existing approaches often treat source code as textual documents and utilize information retrieval models to retrieve relevant code snippets that match a given query. These approaches mainly rely on the textual similarity between source code and natural language query. They lack a deep understanding of the semantics of queries and source code.
DOI 原文 ·
@inproceedings{paperbot4493,
title = {Deep code search},
author = {Xiaodong Gu and Hongyu Zhang and Sunghun Kim},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3180167}
}