On the Relation of Refactoring and Software Defects
Jacek Ratzinger, Thomas Sigmund, Harald C. Gall · 2008
This paper analyzes the influence of evolution activities such as refactoring on software defects. In a case study of five open source projects we used attributes of software evolu-tion to predict defects in time periods of six months. We use versioning and issue tracking systems to extract 110 data mining features, which are separated into refactoring and non-refactoring related features. These features are used as input into classification algorithms that create prediction models for software defects. We found out that refactoring related features as well as non-refactoring related features lead to high quality prediction models. Additionally, we discovered that refactorings and defects have an inverse cor-relation: The number of software defects decreases, if the number of refactorings increased in the preceding time pe-riod. As a result, refactoring should be a significant part of both bug fixes and other evolutionary changes to reduce software defects. Categories and Subject Descriptors D.2.8 [Software Engineering]: Evolution—software defects, pre-diction