2012 · 165 citations · 24 references
ComputingComputer ScienceMethod ValidationOperating SystemsSoftware EngineeringSoftware DesignSoftware MaintenanceSoftware RefactoringSoftware TestingStatic Code AnalysisAutomated RefactoringBehavior-preserving RefactoringEmpirical EvaluationRefactoringRefactoring DetectionRefactoring Operations
Refactorings are defined as behavior‑preserving source‑code transformations intended to improve maintainability, yet they can introduce faults. This study investigates how often refactoring activities induce faults in three Java systems—Apache Ant, Xerces, and Argo UML. The authors automatically identified 15,008 refactorings of 52 kinds with Ref‑Finder and then applied the SZZ algorithm to determine fault causation. Results show that while many refactorings are harmless, hierarchy‑related changes such as pull‑up method frequently trigger faults, indicating a need for focused inspection or testing.
Refactorings are - as defined by Fowler - behavior preserving source code transformations. Their main purpose is to improve maintainability or comprehensibility, or also reduce the code footprint if needed. In principle, refactorings are defined as simple operations so that are "unlikely to go wrong" and introduce faults. In practice, refactoring activities could have their risks, as other changes. This paper reports an empirical study carried out on three Java software systems, namely Apache Ant, Xerces, and Ar-go UML, aimed at investigating to what extent refactoring activities induce faults. Specifically, we automatically detect (and then manually validate) 15,008 refactoring operations (of 52 different kinds) using an existing tool (Ref-Finder). Then, we use the SZZ algorithm to determine whether it is likely that refactorings induced a fault. Results indicate that, while some kinds of refactorings are unlikely to be harmful, others, such as refactorings involving hierarchies (e.g., pull up method), tend to induce faults very frequently. This suggests more accurate code inspection or testing activities when such specific refactorings are performed.
24
Handbook of Parametric and Nonparametric Statistical Procedures
Technometrics · 2004 · 4.7K citations
Refactoring improving the design of existing code
Mauricio A. Saca · 2017 · 2.1K citations
A survey of software refactoring
Tom Mens, Tom Tourwé · IEEE Transactions on Software Engineering · 2004 · 1.2K citations · Full text
Jacek Śliwerski, Thomas Zimmermann, Andreas Zeller · ACM SIGSOFT Software Engineering Notes · 2005 · 803 citations
Predicting faults using the complexity of code changes
Ahmed E. Hassan · 2009 · 697 citations