An Automated Approach to Discovering Software Refactorings by Comparing Successive Versions

Bo Liu, Hui Liu*, Nan Niu, Yuxia Zhang, Guangjie Li, He Jiang, Yanjie Jiang*

*此作品的通讯作者

科研成果: 期刊稿件文章同行评审

摘要

Software developers and maintainers frequently conduct software refactorings to improve software quality. Identifying the conducted software refactorings may significantly facilitate the comprehension of software evolution, and thus facilitate software maintenance and evolution. Besides that, the identified refactorings are also valuable for data-driven approaches in software refactoring. To this end, researchers have proposed a few approaches to identifying software refactorings automatically. However, the performance (especially precision) of such approaches deserves substantial improvement. To this end, in this paper, we propose a novel refactoring detection approach, called REEXTRACTOR+. At the heart of REEXTRACTOR+ is a reference-based entity matching algorithm that matches coarse-grained code entities (e.g., classes and methods) between two successive versions, and a context-aware statement matching algorithm that matches statements within a pair of matched methods. We evaluated REEXTRACTOR+ on a benchmark consisting of 400 commits from 20 real-world projects. The evaluation results suggested that REEXTRACTOR+ significantly outperformed the state of the art in refactoring detection, reducing the number of false positives by 59.6% and improving recall by 19.2%. We also evaluated the performance of the proposed matching algorithms that serve as the cornerstone of refactoring detection. The evaluation results suggested that the proposed algorithms excel in matching code entities, substantially reducing the number of mistakes (false positives plus false negatives) by 67% compared to the state-of-the-art approaches.

源语言英语
期刊IEEE Transactions on Software Engineering
DOI
出版状态已接受/待刊 - 2025

指纹

探究 'An Automated Approach to Discovering Software Refactorings by Comparing Successive Versions' 的科研主题。它们共同构成独一无二的指纹。

引用此

Liu, B., Liu, H., Niu, N., Zhang, Y., Li, G., Jiang, H., & Jiang, Y. (已接受/印刷中). An Automated Approach to Discovering Software Refactorings by Comparing Successive Versions. IEEE Transactions on Software Engineering. https://doi.org/10.1109/TSE.2025.3534239