On the relationship between refactoring actions and bugs: a differentiated replication
Massimiliano Di Penta, Gabriele Bavota, Fiorella Zampetti
Abstract
Software refactoring aims at improving code quality while preserving the system's external behavior. Although in principle refactoring is a behavior-preserving activity, a study presented by Bavota et al. in 2012 reported the proneness of some refactoring actions (e.g., pull up method) to induce faults. The study was performed by mining refactoring activities and bugs from three systems. Taking profit of the advances made in the mining software repositories field (e.g., better tools to detect refactoring actions at commit-level granularity), we present a differentiated replication of the work by Bavota et al. in which we (i) overcome some of the weaknesses that affect their experimental design, (ii) answer the same research questions of the original study on a much larger dataset (3 vs 103 systems), and (iii) complement the quantitative analysis of the relationship between refactoring and bugs with a qualitative, manual inspection of commits aimed at verifying the extent to which refactoring actions trigger bug-fixing activities. The results of our quantitative analysis confirm the findings of the replicated study, while the qualitative analysis partially demystifies the role played by refactoring actions in the bug introduction.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 16b5d3bf-8827-4b9b-ba34-4a61e717fa98Cited by top-tier papers1
Ask how each one uses itRelated papers
- RegMiner: towards constructing a large regression dataset from code evolution historyXuezhi Song, Yun Lin, Siang Hwee Ng, Yijian Wu et al.ISSTA 2022 · 11 citations
- Do bugs lead to unnaturalness of source code?Yanjie Jiang, Hui Liu, Yuxia Zhang, Weixing Ji et al.FSE 2022 · 8 citations
- Code Cloning in Solidity Smart Contracts: Prevalence, Evolution, and Impact on DevelopmentRan Mo, Haopeng Song, Wei Ding, Chaochao WuICSE 2025 · 1 citation
- An Empirical Study on Release-Wise Refactoring PatternsShayan Noei, Heng Li, Ying ZouFSE 2025 · 1 citation
- Causal or Correlational? A Cohort Study on the Effects of Code Smells on Class Change- and Fault-PronenessSabato Nocera, Sira Vegas, Giuseppe Scanniello, Massimiliano Di Penta et al.ICSE 2026 · 1 citation
