Skip to main content
QUICK REVIEW

[论文解读] D&C: A Divide-and-Conquer Approach to IR-based Bug Localization

Anil Koyuncu, Tegawendé F. Bissyandé|arXiv (Cornell University)|Feb 7, 2019
Software Engineering ResearchComputer Science参考文献 49被引用 18
一句话总结

本文提出 D&C,一种新颖的基于信息检索(IR)的错误定位的分治方法,通过在错误报告的特定子集上训练多个梯度提升分类器,学习相似性特征的最优权重。D&C 在 Bench4BL 数据集上实现了最先进性能,相较于现有工具,MAP 提升 4–10 个百分点,MRR 提升 1–12 个百分点,50% 的错误在 Top1 位置被定位,85% 在 Top10 位置被定位。

ABSTRACT

Many automated tasks in software maintenance rely on information retrieval techniques to identify specific information within unstructured data. Bug localization is such a typical task, where text in a bug report is analyzed to identify file locations in the source code that can be associated to the reported bug. Despite the promising results, the performance offered by IR-based bug localization tools is still not significant for large adoption. We argue that one reason could be the attempt to build a one-size-fits-all approach. In this paper, we extensively study the performance of state-of-the-art bug localization tools, focusing on query formulation and its importance with respect to the localization performance. Building on insights from this study, we propose a new learning approach where multiple classifier models are trained on clear-cut sets of bug-location pairs. Concretely, we apply a gradient boosting supervised learning approach to various sets of bug reports whose localizations appear to be successful with specific types of features. The training scenario builds on our findings that the various state-of-the-art localization tools can be highly performant for specific sets of bug reports. We implement D&C, which computes appropriate weights that should be assigned to the similarity measurements between pairs of information token types. Experimental results on large and up-to-date datasets reveal that D&C outperforms state-of-the-art tools. On average, the experiments yield an MAP score of 0.52, and an MRR score of 0.63 with a curated dataset, which provides a substantial performance improvement over all tools: MAP is improved by between 4 and up to 10 percentage points, while MRR is improved by between 1 and up to 12. Finally, we note that D&C is stable in its localization performance: around 50% of bugs can be located at Top1, 77% at Top5 and 85% at Top10.

研究动机与目标

  • 探究为何现有基于信息检索的错误定位工具尽管理论潜力强大,但实际表现欠佳。
  • 分析各项信息检索特征(如错误报告标题、堆栈跟踪)在多样化错误报告中对定位准确率的贡献。
  • 通过识别报告特定的特征有效性,解决“一刀切”方法的局限性。
  • 开发一种可扩展的自适应方法,为每类报告学习最优的相似性权重,以提升定位精度。
  • 证明通过在同质化的错误报告子集上训练专用分类器,可实现性能提升。

提出的方法

  • 作者通过移除修复后活动,对 Bench4BL 数据集进行清洗,以确保评估的纯净性。
  • 评估六种最先进的 IRBL 工具,按特征类型分析其性能,识别在特定报告子集上表现优异的特征。
  • 基于性能聚类结果,将数据集划分为同质化组,其中特定工具(及其特征集)表现最佳。
  • 针对每组,训练梯度提升分类器,学习错误报告与源代码标记之间相似性得分的最优权重。
  • 最终排名通过聚合所有专用分类器的预测结果生成,每个分类器按其所属组的性能进行加权。
  • 该方法在清洗后和原始的 Bench4BL 数据集上,使用平均平均精度(MAP)和平均倒数排名(MRR)作为评估指标。

实验结果

研究问题

  • RQ1哪些信息检索特征(如标题、堆栈跟踪)在不同类型的错误报告中对准确的错误定位贡献最大?
  • RQ2是否可以通过在特定 IR 特征最有效的错误报告子集上训练专用模型,来提升性能?
  • RQ3分治策略(即在不同报告聚类上训练不同分类器)是否比整体式模型带来更高的整体定位准确率?
  • RQ4在多样化的项目和报告类型中,所提出的 D&C 方法在 Top-k 定位上的稳定性如何?
  • RQ5在真实场景中,特征专用模型在多大程度上优于通用型 IRBL 工具?

主要发现

  • 在 Bench4BL 数据集的清洗版本上,D&C 达到 MAP 0.52 和 MRR 0.63,显著优于所有最先进的工具。
  • 在所有评估项目中,与现有工具相比,D&C 的 MAP 提升 4 至 10 个百分点,MRR 提升 1 至 12 个百分点。
  • 约 50% 的错误在 Top1 位置被定位,77% 在 Top5 位置,85% 在 Top10 位置,表明性能强大且稳定。
  • 研究证实,不同 IR 工具在不同错误报告子集上表现最佳,验证了专用自适应方法的必要性。
  • 性能增益在多个项目中保持一致,证明了 D&C 框架的可扩展性和鲁棒性。
  • 结果表明,特征特定性能存在显著差异,而“一刀切”模型无法捕捉这种异质性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。