International Conference Peer-reviewed

Impact of Change Granularity in Refactoring Detection

Lei Chen, Shinpei Hayashi

In Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension (ICPC 2022), pp. 565–569, Online, May 2022.

Abstract

Detecting refactorings in commit history is essential to improve the comprehension of code changes in code reviews and to provide valuable information for empirical studies on software evolution. Several techniques have been proposed to detect refactorings accurately at the granularity level of a single commit. However, refactorings may be performed over multiple commits because of code complexity or other real development problems, which is why attempting to detect refactorings at single-commit granularity is insufficient. We observe that some refactorings can be detected only at coarser granularity, that is, changes spread across multiple commits. Herein, this type of refactoring is referred to as coarse-grained refactoring (CGR). We compared the refactorings detected on different granularities of commits from 19 open-source repositories. The results show that CGRs are common, and their frequency increases as the granularity becomes coarser. In addition, we found that Move-related refactorings tended to be the most frequent CGRs. We also analyzed the causes of CGR and suggested that CGRs will be valuable in refactoring research.

Video

Slides

BibTeX

@inproceedings{chenlei-icpc2022,
    author = {Lei Chen and Shinpei Hayashi},
    title = {Impact of Change Granularity in Refactoring Detection},
    booktitle = {Proceedings of the 30th IEEE/ACM International Conference on Program Comprehension},
    pages = {565--569},
    doi = {10.1145/3524610.3528386},
    year = 2022,
}
Type
International Conference
Conference
ICPC 2022
Location
Online
Presented
May 17, 2022
Volume / Pages
pp. 565–569
Acceptance rate
11/19 (58%)
DOI
10.1145/3524610.3528386