Skip to main content
QUICK REVIEW

[论文解读] A Systematic Literature Review of Automated Query Reformulations in Source Code Search.

Mohammad Masudur Rahman, Chanchal K. Roy|arXiv (Cornell University)|Aug 22, 2021
Software Engineering Research参考文献 170被引用 4
一句话总结

本篇系统性文献回顾分析了70篇关于源代码搜索中自动查询重写的研究,识别出八种关键方法论(如术语加权和同义词查找),同时揭示了词汇不匹配和评估薄弱等主要局限。该研究强调了泛化能力不足与开发者负担过重的关键差距,并为提升开发者在代码搜索中的效率提出了未来研究方向。

ABSTRACT

Software developers often fix critical bugs to ensure the reliability of their software. They might also need to add new features to their software at a regular interval to stay competitive in the market. These bugs and features are reported as change requests (i.e., technical documents written by software users). Developers consult these documents to implement the required changes in the software code. As a part of change implementation, they often choose a few important keywords from a change request as an ad hoc query. Then they execute the query with a code search engine (e.g., Lucene) and attempt to find out the exact locations within the software code that need to be changed. Unfortunately, even experienced developers often fail to choose the right queries. As a consequence, the developers often experience difficulties in detecting the appropriate locations within the code and spend the majority of their time in numerous trials and errors. There have been many studies that attempt to support developers in constructing queries by automatically reformulating their ad hoc queries. In this systematic literature review, we carefully select 70 primary studies on query reformulations from 2,970 candidate studies, perform an in-depth qualitative analysis using the Grounded Theory approach, and then answer six important research questions. Our investigation has reported several major findings. First, to date, eight major methodologies (e.g., term weighting, query-term co-occurrence analysis, thesaurus lookup) have been adopted in query reformulation. Second, the existing studies suffer from several major limitations (e.g., lack of generalizability, vocabulary mismatch problem, weak evaluation, the extra burden on the developers) that might prevent their wide adoption. Finally, we discuss several open issues in search query reformulations and suggest multiple future research opportunities.

研究动机与目标

  • 为解决开发者在构建有效即席查询进行源代码搜索时面临的挑战,避免耗时的试错过程。
  • 识别并分类用于自动查询重写的方法论,以提升软件维护任务中的搜索精确率与召回率。
  • 评估现有方法的局限性,包括词汇不匹配、评估实践薄弱以及缺乏泛化能力。
  • 识别开放性问题,并为源代码搜索中的自动查询重写提出未来研究机会。

提出的方法

  • 对2,970篇候选研究进行了系统性文献回顾,依据预设的纳入与排除标准筛选出70篇主要研究。
  • 采用基础理论方法对所选研究进行深入的定性分析,以识别重复出现的主题与方法论。
  • 将查询重写技术划分为八类主要方法论:术语加权、查询项共现分析、同义词查找等。
  • 基于评估实践(包括测试数据集、评估指标与可复现性)评估现有研究的质量与严谨性。
  • 综合研究发现,识别当前查询重写方法中的重复局限与研究空白。

实验结果

研究问题

  • RQ1在源代码搜索的自动查询重写中,主导性的方法论有哪些?
  • RQ2现有查询重写方法在真实世界软件开发环境中的关键局限是什么?
  • RQ3当前研究如何评估查询重写技术的有效性?其评估策略存在哪些不足?
  • RQ4哪些开放性问题与挑战阻碍了开发者对查询重写系统的采纳?
  • RQ5未来哪些研究方向可提升自动查询重写在代码搜索中的泛化能力与实际可用性?

主要发现

  • 已采用八种主要方法论(如术语加权、查询项共现分析、同义词查找)进行查询重写研究。
  • 现有研究存在显著局限,包括在不同代码库与编程语言间泛化能力差。
  • 词汇不匹配问题仍是持续挑战,即查询术语与相关代码库术语不一致。
  • 研究中的评估实践往往薄弱,缺乏对标准化基准、可复现结果或真实世界验证的充分使用。
  • 许多方法给开发者带来额外负担,如需手动配置或领域特定调优,降低实际采纳率。
  • 尽管有所进展,但尚无单一方法论在各类软件系统中始终优于其他方法,表明亟需更稳健且自适应的解决方案。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。