RefDiff: Detecting Refactorings in Version Histories
Danilo Silva, Marco Túlio Valente · IEEE/ACM International Conference on Mining Software Repositories (MSR) · 2017
Refactoring is a well-known technique that is widely adopted by software engineers to improve the design and enable the evolution of a system. Knowing which refactoring operations were applied in a code change is a valuable information to understand software evolution, adapt software components, merge code changes, and other applications. In this paper, we present RefDiff, an automated approach that identifies refactorings performed between two code revisions in a git repository. RefDiff employs a combination of heuristics based on static analysis and code similarity to detect 13 well-known refactoring types. In an evaluation using an oracle of 448 known refactoring operations, distributed across seven Java projects, our approach achieved precision of 100% and recall of 88%. Moreover, our evaluation suggests that RefDiff has superior precision and recall than existing state-of-the-art approaches.
Cited by 139 works. doi:10.1109/msr.2017.14 Open-access PDF
Authors
References
- Introduction to Modern Information Retrieval
- Refactoring: Improving the Design of Existing Code
- Introduction to Modern Information Retrieval
- How We Refactor, and How We Know It
- UMLDiff
- Finding refactorings via change metrics
- CatchUp!
- Automated Detection of Refactorings in Evolving Components
- Identifying Refactorings from Source-Code Changes
- Template-based reconstruction of complex refactorings