【24h】

Query expansion via WordNet for effective code search

机译:通过WordNet查询扩展以获得有效的代码搜索

获取原文

摘要

Source code search plays an important role in software maintenance. The effectiveness of source code search not only relies on the search technique, but also on the quality of the query. In practice, software systems are large, thus it is difficult for a developer to format an accurate query to express what really in her/his mind, especially when the maintainer and the original developer are not the same person. When a query performs poorly, it has to be reformulated. But the words used in a query may be different from those that have similar semantics in the source code, i.e., the synonyms, which will affect the accuracy of code search results. To address this issue, we propose an approach that extends a query with synonyms generated from WordNet. Our approach extracts natural language phrases from source code identifiers, matches expanded queries with these phrases, and sorts the search results. It allows developers to explore word usage in a piece of software, helps them quickly identify relevant program elements for investigation or quickly recognize alternative words for query reformulation. Our initial empirical study on search tasks performed on the JavaScript/ECMAScript interpreter and compiler, Rhino, shows that the synonyms used to expand the queries help recommend good alternative queries. Our approach also improves the precision and recall of Conquer, a state-of-the-art query expansion/reformulation technique, by 5% and 8% respectively.
机译:源代码搜索在软件维护中播放重要作用。源代码搜索的有效性不仅依赖于搜索技术,还依赖于查询的质量。在实践中,软件系统很大,因此开发人员难以格式化准确的查询来表达真正在她/他的脑海中的内容,特别是当维护者和原始开发人员不是同一个人时。当查询表现不佳时,必须重新格式化。但是,查询中使用的单词可能与源代码中具有类似语义的词语,即,同义词,这将影响代码搜索结果的准确性。要解决此问题,我们提出了一种方法,该方法将查询与WordNet生成的同义词扩展。我们的方法从源代码标识符中提取自然语言短语,匹配这些短语的扩展查询,并对搜索结果进行排序。它允许开发人员在一块软件中探索单词使用,帮助他们快速识别相关的程序元素以进行调查或快速识别用于查询重构的替代单词。我们对在JavaScript / ECMAScript解释器和编译器,Rhino上执行的搜索任务的初始实证研究表明,用于展开查询的同义词有助于推荐良好的替代查询。我们的方法还提高了征服,最先进的查询扩展/重构技术,分别为5%和8%的精确度和回忆。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号