arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1703.01443cs.SE
收藏

基于群体知识的代码搜索查询扩展

Query Expansion Based on Crowd Knowledge for Code Search

Liming Nie, He Jiang, Zhilei Ren, Zeyi Sun, Xiaochen Li

摘要:

由于代码搜索是软件开发实践中频繁的开发人员活动,因此提高代码搜索的性能是一项关键任务。在基于文本检索的代码检索技术中,术语不匹配问题是影响检索效率的关键语言问题。查询扩展通过对查询的重新定义,为解决术语不匹配问题提供了有效的途径。在本文中,我们提出了查询扩展基于群体知识(QECK),一种新的技术,以提高代码搜索算法的性能。QECK从Stack Overflow上的高质量伪相关反馈问题和答案对中识别特定于软件的扩展词,以自动生成扩展查询。此外,我们将QECK的经典Rocchio的模型,并提出基于QECK的代码搜索方法QECKRocchio。我们进行了三个实验,以评估我们的QECK技术和调查QECKRocchio在一个大规模的语料库,包含真实世界的代码片段和问答对集合。结果表明,QECK在精度上提高了三种码搜索算法的性能,提高了64%,在NDCG上提高了35%。同时,与现有的查询扩展方法相比,QECK Rocchio方法在精度上提高了22%,在NDCG上提高了16%。

英文摘要:

As code search is a frequent developer activity in software development practices, improving the performance of code search is a critical task. In the text retrieval based search techniques employed in the code search, the term mismatch problem is a critical language issue for retrieval effectiveness. By reformulating the queries, query expansion provides effective ways to solve the term mismatch problem. In this paper, we propose Query Expansion based on Crowd Knowledge (QECK), a novel technique to improve the performance of code search algorithms. QECK identifies software-specific expansion words from the high quality pseudo relevance feedback question and answer pairs on Stack Overflow to automatically generate the expansion queries. Furthermore, we incorporate QECK in the classic Rocchio's model, and propose QECK based code search method QECKRocchio. We conduct three experiments to evaluate our QECK technique and investigate QECKRocchio in a large-scale corpus containing real-world code snippets and a question and answer pair collection. The results show that QECK improves the performance of three code search algorithms by up to 64 percent in Precision, and 35 percent in NDCG. Meanwhile, compared with the state-of-the-art query expansion method, the improvement of QECK Rocchio is 22 percent in Precision, and 16 percent in NDCG.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑