RefactoringMiner 2.0

RefactoringMiner 2.0
复制标题

重构矿工2.0

DOI:
10.1109/tse.2020.3007722
复制
发表时间:
2020
影响因子:
7.4
通讯作者:
Danny Dig
Danny Dig
中科院分区:
计算机科学1区
文献类型:
--
作者:
Nikolaos Tsantalis;Ameya Ketkar;Danny Dig

文献摘要

被引文献

相似文献

重构检测对于各种应用程序和任务至关重要:(I)关于代码演化的经验研究,(Ii)库API迁移的工具,(Iii)代码审查和更改理解。然而,最近的研究质疑了最先进的重构挖掘工具的准确性,这对检测到的重构的可靠性构成了威胁。此外,大多数重构挖掘工具依赖于代码相似性阈值。寻找适用于所有项目的通用阈值,无论其体系结构风格、应用程序领域和开发实践如何,都是极具挑战性的。因此,在之前的一项工作[N.Tsantalis,M.Mansouri,L.M.Eshkevari,D.Mazinania,and D.Dig,Accurate and Efficient Refactoring Detect in Commit History,第40届International Conference on Software Engineering,2018,pp.483-494]中,我们引入了第一个不需要任何代码相似性阈值就可以操作的重构挖掘工具。在这项工作中,我们扩展了我们的工具以支持在方法体中进行的低级别重构。为了评估我们的工具,我们创建了到目前为止最准确、最完整和最具代表性的重构先知之一,包括40个不同重构类型的7,226个真实实例,由一个(最少)到六个(最大)不同的工具检测到,并由一到四个重构专家进行验证。我们的评估表明,在所有竞争工具中,我们的方法达到了最高的平均准确率(99.6%)和召回率(94%),中位数上的速度是第二快的竞争工具的2.6倍。
Refactoring detection is crucial for a variety of applications and tasks: (i) empirical studies about code evolution, (ii) tools for library API migration, (iii) code reviews and change comprehension. However, recent research has questioned the accuracy of the state-of-the-art refactoring mining tools, which poses threats to the reliability of the detected refactorings. Moreover, the majority of refactoring mining tools depend on code similarity thresholds. Finding universal threshold values that can work well for all projects, regardless of their architectural style, application domain, and development practices is extremely challenging. Therefore, in a previous work [N. Tsantalis, M. Mansouri, L. M. Eshkevari, D. Mazinanian, and D. Dig, Accurate and efficient refactoring detection in commit history, in 40th International Conference on Software Engineering, 2018, pp. 483–494], we introduced the first refactoring mining tool that does not require any code similarity thresholds to operate. In this work, we extend our tool to support low-level refactorings that take place within the body of methods. To evaluate our tool, we created one of the most accurate, complete, and representative refactoring oracles to date, including 7,226 true instances for 40 different refactoring types detected by one (minimum) up to six (maximum) different tools, and validated by one up to four refactoring experts. Our evaluation showed that our approach achieves the highest average precision (99.6 percent) and recall (94 percent) among all competitive tools, and on median is 2.6 times faster than the second faster competitive tool.