# RefDiff: Detecting Refactorings in Version Histories

arXiv: https://arxiv.org/abs/1704.01544 · HTML: https://mlsanity.com/paper/1704.01544/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 5 Apr 2017.

## Built on by (most cited first, 5 of 5)

- [NewsEdits: A News Article Revision Dataset and a Document-Level Reasoning Challenge](https://mlsanity.com/paper/2206.07106/) (2022)
- [A systematic literature review on the code smells datasets and validation mechanisms](https://mlsanity.com/paper/2306.01377/) (2023)
- [AgentSZZ: Teaching the LLM Agent to Play Detective with Bug-Inducing Commits](https://mlsanity.com/paper/2604.02665/) (2026)
- [AgenticSZZ: Temporal Knowledge Graph-Guided Agentic Bug-Inducing Commit Identification](https://mlsanity.com/paper/2602.02934/) (2026)
- [SemaDiff: Identifying Semantic-Changing Commits with Generated Code and Tests](https://mlsanity.com/paper/2607.13111/) (2026)

## Abstract (arXiv)

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.
