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

使用众包知识和超大数据分析的代码搜索查询的有效重构

Effective Reformulation of Query for Code Search using Crowdsourced Knowledge and Extra-Large Data Analytics

Mohammad Masudur Rahman, Chanchal K. Roy

摘要:

软件开发者在使用代码搜索引擎时经常发出用于代码搜索的通用自然语言查询(例如,GitHub原生搜索,Krugle)。由于词汇不匹配的问题,这样的查询通常不会导致任何相关的结果。在本文中,我们提出了一种新的技术,自动识别相关的和特定的API类从堆栈溢出Q & A网站的编程任务编写为一个自然语言查询,然后重新制定的查询,以改善代码搜索。我们首先使用伪相关反馈和两个术语加权算法从Stack Overflow中收集候选API类,然后使用Borda计数和查询关键字与API类之间的语义接近度对候选API类进行排名。语义接近度是通过对Stack Overflow的130万个问题和答案的分析确定的。使用310个代码搜索查询的实验报告说,我们的技术以48%的准确率和58%的召回率提出了相关的API类,分别比最先进的技术高出32%和48%。Google、Stack Overflow和GitHub native search)报告称,我们重新制定的查询(1)优于最先进的查询,(2)显著改善了这些当代搜索引擎提供的代码搜索结果。

英文摘要:

Software developers frequently issue generic natural language queries for code search while using code search engines (e.g., GitHub native search, Krugle). Such queries often do not lead to any relevant results due to vocabulary mismatch problems. In this paper, we propose a novel technique that automatically identifies relevant and specific API classes from Stack Overflow Q & A site for a programming task written as a natural language query, and then reformulates the query for improved code search. We first collect candidate API classes from Stack Overflow using pseudo-relevance feedback and two term weighting algorithms, and then rank the candidates using Borda count and semantic proximity between query keywords and the API classes. The semantic proximity has been determined by an analysis of 1.3 million questions and answers of Stack Overflow. Experiments using 310 code search queries report that our technique suggests relevant API classes with 48% precision and 58% recall which are 32% and 48% higher respectively than those of the state-of-the-art. Comparisons with two state-of-the-art studies and three popular search engines (e.g., Google, Stack Overflow, and GitHub native search) report that our reformulated queries (1) outperform the queries of the state-of-the-art, and (2) significantly improve the code search results provided by these contemporary search engines.

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

↑