Journal of Software:2017.28(6):1405-1417

(北京大学 信息科学技术学院, 北京 100871;高可信软件技术教育部重点实验室(北京大学), 北京 100871)
Description Reinforcement Based Code Search
LI Xuan,WANG Qian-Xiang,JIN Zhi
(School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China;Key Laboratory of High Confidence Software Technologies(Peking University), Beijing 100871, China)
Chart / table
Similar Articles
Article :Browse 2014   Download 1481
Received:July 28, 2016    Revised:October 11, 2016
> 中文摘要: 如何有效地帮助程序员从目前的各种代码库中搜索与特定编程任务相关的代码,已成为软件工程重要的研究领域之一.提出一种基于增强描述的代码搜索方法DERECS,该方法首先基于开源项目、问答系统等构建一个代码-描述语料库,并分析代码及自然语言描述,提取方法调用和代码结构相关特征值;然后,基于代码片段中的方法调用及代码片段的结构特征对代码进行描述增强,以减小被搜索的代码与自然语言查询语句之间的差异,扩大搜索的范围.使用真实自然语言查询语句作为测试基准,对DERECS进行验证.验证结果表明,DERECS的效果显著优于典型方法SNIFF和Krugle的查询结果.
Abstract:Effectively searching code for specific programming task from code base has become an important research field of software engineering. This paper presents a description reinforcement based code search (DERECS) approach. DERECS first builds a codedescription pair corpus, analyzes both code and its natural language description, and extracts features about method calls and code structure. DERECS reinforces the description of code based on the method calls and code structure features, reduces the gaps between code snippet and natural language query, and expands the search scope. Evaluation is conducted against real-world queries, and the results show DERECS is significantly better than SNIFF and Krugle.
文章编号:     中图分类号:    文献标志码:
基金项目:国家重点基础研究发展计划(973)(2015CB352200,2015CB352201);国家自然科学基金(61672045,61421091,61529201,91318301) 国家重点基础研究发展计划(973)(2015CB352200,2015CB352201);国家自然科学基金(61672045,61421091,61529201,91318301)
Foundation items:National Basic Research Program of China (973) (2015CB352200, 2015CB352201); National Natural Science Foundation of China (61672045, 61421091, 61529201, 91318301)
Reference text:


LI Xuan,WANG Qian-Xiang,JIN Zhi.Description Reinforcement Based Code Search.Journal of Software,2017,28(6):1405-1417