RAT: A Refactoring-Aware Traceability Model for Bug Localization

RAT: A Refactoring-Aware Traceability Model for Bug Localization
复制标题

DOI:
10.1109/icse48619.2023.00028
复制
发表时间:
2023-05
期刊:
2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)
影响因子:
--
通讯作者:
Feifei Niu;W. K. Assunção;LiGuo Huang;Christoph Mayr-Dorn;Jidong Ge;Bin Luo;Alexander Egyed
Feifei Niu;W. K. Assunção;LiGuo Huang;Christoph Mayr-Dorn;Jidong Ge;Bin Luo;Alexander Egyed
中科院分区:
其他
文献类型:
--
作者:
Feifei Niu;W. K. Assunção;LiGuo Huang;Christoph Mayr-Dorn;Jidong Ge;Bin Luo;Alexander Egyed

文献摘要

被引文献

相似文献

在软件系统的发展过程中,会产生大量的bug报告。定位需要更改的源代码文件以修复这些错误是一项具有挑战性的任务。基于信息检索的错误定位技术通过将错误报告与关于源代码的历史信息(例如,以前解决的bug报告,提交日志)。这些技术已被证明是有效和易于使用的。然而,所有这些技术中几乎无处不在的一个缺陷是它们忽略了代码重构。代码重构是软件系统演化过程中的常见现象,但从典型版本控制系统的角度来看,代码重构破坏了代码历史。例如,一个类在被重命名后,会显示为两个具有不同历史的独立类。显然,这是一个影响任何利用代码历史的技术的问题。本文提出了一个重构感知的可追溯性模型,以跟踪代码的演化历史。使用此模型,我们通过分析代码重构的影响来重建代码历史,以正确地将原本是碎片化的历史缝合在一起。为了证明重构感知历史确实是有益的,我们研究了三种广泛采用的错误定位技术,这些技术利用了代码历史,这是现有方法中的重要组成部分。我们对11个开源项目的评估表明,考虑到代码重构显着提高了这些错误定位技术的结果,而不显着改变技术本身。在一个项目中使用的重构越多,我们观察到的好处就越大。根据我们的发现,我们相信,利用代码历史的最新技术应该从我们的工作中受益。
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.