paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RAT: A Refactoring-Aware Traceability Model for Bug Localization

RAT:面向缺陷定位的重构感知可追溯性模型
ICSE 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)2023匹配度 2/10 · 论文关注重构感知的可追溯性模型与基于历史的缺陷定位,属于软件工程/经验研究,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户研究画像的核心方向关联很弱。引用 19 inbox
Feifei Niu, Wesley K. G. Assunção, LiGuo Huang, Christoph Mayr-Dorn, Jidong Ge, Bin Luo, Alexander Egyed
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出重构感知的可追溯性模型,重建被重构打断的代码历史,从而显著提升基于历史的缺陷定位效果。

软件演化过程中会产生大量缺陷报告,而定位需要修改的源文件十分困难。基于信息检索的缺陷定位技术通过将缺陷报告与代码历史信息(如已解决的缺陷报告、提交日志)关联来进行定位,高效且易用,但它们几乎都忽略了一个问题:代码重构。重构在软件演化中很常见,但从版本控制系统的角度看,重构会打断代码历史,例如类被重命名后会被视为两个具有独立历史的不同类,从而影响所有依赖代码历史的技术。本文提出重构感知的可追溯性模型(RAT)来跟踪代码演化历史:通过分析代码重构的影响,将本已碎片化的历史正确地拼接起来,从而重建代码历史。为验证重构感知历史确实有益,作者研究了三种广泛采用、依赖代码历史的缺陷定位技术,并在 11 个开源项目上进行评估。结果表明,考虑代码重构能在不显著改动这些技术本身的前提下显著改善其缺陷定位结果;项目中使用的重构越多,收益越明显。作者认为,大量利用代码历史的现有工作都能从本工作中获益。

问题
现有基于信息检索的缺陷定位技术依赖代码历史(提交日志、历史缺陷报告等),但普遍忽略代码重构,而重构会打断版本控制系统中的代码历史,导致历史碎片化并削弱定位效果。
方法
提出重构感知的可追溯性模型(RAT),通过分析代码重构对代码演化的影响,将碎片化的历史正确拼接,重建重构感知的代码演化历史,并将其嵌入三种依赖代码历史的缺陷定位技术中。
评估
在 11 个开源项目上对三种广泛采用的缺陷定位技术进行实证评估,比较使用重构感知历史前后的定位效果,并分析项目重构使用程度与收益之间的关系。
原文摘要(Abstract)

A large number of bug reports are created during the evolution of a software system. Locating the source code files that need to be changed in order to fix these bugs is a challenging task. Information retrieval-based bug localization techniques do so by correlating bug reports with historical information about the source code (e.g., previously resolved bug reports, commit logs). These techniques have shown to be efficient and easy to use. However, one flaw that is nearly omnipresent in all these techniques is that they ignore code refactorings. Code refactorings are common during software system evolution, but from the perspective of typical version control systems, they break the code history. For example, a class when renamed then appears as two separate classes with separate histories. Obviously, this is a problem that affects any technique that leverages code history. This paper proposes a refactoring-aware traceability model to keep track of the code evolution history. With this model, we reconstruct the code history by analyzing the impact of code refactorings to correctly stitch together what would otherwise be a fragmented history. To demonstrate that a refactoring aware history is indeed beneficial, we investigated three widely adopted bug localization techniques that make use of code history, which are important components in existing approaches. Our evaluation on 11 open source projects shows that taking code refactorings into account significantly improves the results of these bug localization techniques without significant changes to the techniques themselves. The more refactorings are used in a project, the stronger the benefit we observed. Based on our findings, we believe that much of the state of the art leveraging code history should benefit from our work.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{NiuAHMGLE23,
  title = {RAT: A Refactoring-Aware Traceability Model for Bug Localization},
  author = {Feifei Niu and Wesley K. G. Assunção and LiGuo Huang and Christoph Mayr-Dorn and Jidong Ge and Bin Luo and Alexander Egyed},
  booktitle = {ICSE},
  year = {2023},
  doi = {10.1109/icse48619.2023.00028}
}