An Empirical Study on the Impact of Change Granularity in Refactoring Detection
Abstract
Detecting refactorings in commit history is essential to improve comprehension to code changes on code reviews, and to provide valuable information for empirical studies on software evolution. Techniques have been proposed to accurately detect refactorings on the granularity of a single commit. However, refactorings can be made over multiple commits because of their complexity or other practical development problems, which cause detecting on only the granularity of a single commit not enough. We observe that some refactorings can only be detected in coarser granularity, i.e., changes conducted over multiple commits, or in the granularity of a single commit but not in coarse-grained. We call these types of refactorings as coarse-grained refactorings (CGRs) and ephemeral refactorings (EPRs). We investigated the features and causes of CGRs and EPRs through an empirical study of 32 open-source Java projects and found that both commonly occur during development. In addition, we found that refactoring types related to splitting or merging classes and packages, as well as those involving modifications to the inheritance structure, tend to be CGRs, and types targeting small objects such as variables and attributes, and refactorings with context-sensitive detection criteria tend to be EPRs. The causes of CGRs and EPRs are analyzed and categorized, and the relationships between the commit messages of CGRs and themselves are also assessed. We found that about 20% of commit messages explicitly suggest the existence of CGRs. We suggest that CGRs and EPRs be valued in refactoring research and that detectors be extended to identify CGRs.
Create a lesson
Metadata
- Journal
- Journal of Systems and Software, 231(112608):1-21, 2026
- Comments
- 24 pages, 17 figures
Related papers
Is Self-Admitted Technical Debt Tested? An Empirical Study of Coverage, Co-change, and Impact
Shared title terminologycs.SESuzuka Yoshimoto, Kosei Horikawa, Daniel Feitosa et al.
An Empirical Study on the Impact of String Interpolation on Program Readability and Comprehension
Shared title terminologycs.SEDaniel Ogenrwot, John Businge, Andreas Stefik
From Code Changes to Slowdowns: An Empirical Study of Performance Regressions in Open-Source Database Kernels
Shared title terminologycs.SEXueli Sun, Shuangxiang Kan
Does Training-Free Delegation Improve Cost Efficiency in Multi-Agent Software Engineering Systems? An Empirical Study
Shared title terminologycs.SEMootez Saad, Mohammad Masudur Rahman, Tushar Sharma
Analyzing and Clarifying Software Change Intentions via Project Asset Dependency Mining
Shared title terminologycs.SEYingtao Fang, Zhi Jin, Tiankuo Zhao et al.
Toward a Non-invasive Robotic-supported Approach for Data Loss Detection in Android Applications
Shared title terminologycs.SEDavi Freitas, Breno Miranda, Juliano Iyoda