Back to Search
Start Over
RefDiff 2.0: A Multi-Language Refactoring Detection Tool
- Source :
- IEEE Transactions on Software Engineering. 47:2786-2802
- Publication Year :
- 2021
- Publisher :
- Institute of Electrical and Electronics Engineers (IEEE), 2021.
-
Abstract
- Identifying refactoring operations in source code changes is valuable to understand software evolution. Therefore, several tools have been proposed to automatically detect refactorings applied in a system by comparing source code between revisions. The availability of such infrastructure has enabled researchers to study refactoring practice in large scale, leading to important advances on refactoring knowledge. However, although a plethora of programming languages are used in practice, the vast majority of existing studies are restricted to the Java language due to limitations of the underlying tools. This fact poses an important threat to external validity. Thus, to overcome such limitation, in this paper we propose RefDiff 2.0, a multi-language refactoring detection tool. Our approach leverages techniques proposed in our previous work and introduces a novel refactoring detection algorithm that relies on the Code Structure Tree (CST), a simple yet powerful representation of the source code that abstracts away the specificities of particular programming languages. Despite its language-agnostic design, our evaluation shows that RefDiff's precision (96%) and recall (80%) are on par with state-of-the-art refactoring detection approaches specialized in the Java language. Our modular architecture also enables one to seamless extend RefDiff to support other languages via a plugin system. As a proof of this, we implemented plugins to support two other popular programming languages: JavaScript and C. Our evaluation in these languages reveals that precision and recall ranges from 88% to 91%. With these results, we envision RefDiff as a viable alternative for breaking the single-language barrier in refactoring research and in practical applications of refactoring detection.
- Subjects :
- Source code
Java
business.industry
Computer science
media_common.quotation_subject
020207 software engineering
02 engineering and technology
JavaScript
computer.software_genre
Software
Code refactoring
0202 electrical engineering, electronic engineering, information engineering
Plug-in
Software engineering
business
Precision and recall
computer
Software evolution
media_common
computer.programming_language
Subjects
Details
- ISSN :
- 23263881 and 00985589
- Volume :
- 47
- Database :
- OpenAIRE
- Journal :
- IEEE Transactions on Software Engineering
- Accession number :
- edsair.doi...........9395dae820c39dc73c34409cac9e2745
- Full Text :
- https://doi.org/10.1109/tse.2020.2968072