An empirical study on the impact of change granularity in refactoring detection

📅 2025-09-01
🏛️ Journal of Systems and Software
📈 Citations: 1
Influential: 0
📄 PDF
🤖 AI Summary
研究探讨了在重构检测中变更粒度的影响,通过分析32个开源Java项目,提出并区分了粗粒度重构(CGRs)和瞬时重构(EPRs),建议扩展检测器以识别CGRs。
📝 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.
Problem

Research questions and friction points this paper is trying to address.

refactoring detection
change granularity
coarse-grained refactorings
ephemeral refactorings
commit history
Innovation

Methods, ideas, or system contributions that make the work stand out.

Coarse-grained Refactorings
Ephemeral Refactorings
Refactoring Detection
Commit Granularity
Software Evolution
L
Lei Chen
School of Computing, Institute of Science Tokyo, Ookayama 2–12–1, Meguro-ku, Tokyo, 152–8550, Japan
Shinpei Hayashi
Shinpei Hayashi
Institute of Science Tokyo
Software EngineeringRefactoringSoftware EvolutionSoftware Maintenance