Conditional-Based Refactorings and Fault-Proneness: An Empirical Study

S. Counsell,Matt Gatrell,R. Hierons,Alessandro Murgia,R. Tonelli,M. Marchesi,G. Concas
DOI: https://doi.org/10.1109/ICSTW.2013.81
2013-03-18
Abstract:Recent empirical work has shown that some of the most frequently applied Java-based refactorings relate to the manipulation of code conditionals and flags. The logic of such code is often complex and difficult to test regressively. One open research issue thus relates to the fault-proneness profiles of classes where these refactorings have been applied, vis-a-vis refactorings on other classes. In this paper, we explore six releases of three Eclipse projects and the faults in the refactored classes of those releases. We explore four specific conditional-based refactorings and the supposition that: classes where these four refactorings have been applied will tend to have relatively higher fault incidences because of the inherent complexity of the embedded logic given by the constructs they operate on. Results showed that one of the four refactorings in particular had been applied to classes with higher fault profiles - the `Replace Nested Conditional with Guard Clauses' refactoring. Some evidence that the `Remove Control Flag' refactoring had also been applied to relatively highly fault-prone classes was found. Relative to other types of refactoring, the result thus suggests that these two effectively signpost fault-prone classes.
What problem does this paper attempt to address?