TY - GEN
T1 - An exploration of the 'introduce explaining variable' refactoring
AU - Counsell, S.
AU - Liu, X.
AU - Swift, S.
AU - Buckley, J.
AU - English, M.
AU - Herold, S.
AU - Eldh, S.
AU - Ermedahl, A.
N1 - Publisher Copyright:
© 2015 ACM.
PY - 2015/5/25
Y1 - 2015/5/25
N2 - While we know much about refactoring trends and their occurrence in open-source and proprietary systems, we still know little about their association with defects or the nature of classes where refactoring is applied. In this paper, we explore one such refactoring, "Introduce explaining variable" (IEV), a low-level code based refactoring which simplifies a complex expression through the introduction of added variables. We explore the possibility that this type of refactoring, requiring manipulation of variables and constructs will have a greater association with defects than other types of refactoring. Classes where they are applied will have lower coupling levels. Five releases from two projects of Eclipse were used to support this analysis and tools to extract both the set of class refactorings and class coupling and size metrics supported the analysis. Results showed that for four out of the five releases studied, classes where the IEV refactoring had been applied were more defect-prone than other classes. Coupling in the same set of classes was higher in all five releases. Size, on the other hand, may be a confounding factor but tentative results suggest that areas of code where this refactoring had been applied are indicative of defect-prone code.
AB - While we know much about refactoring trends and their occurrence in open-source and proprietary systems, we still know little about their association with defects or the nature of classes where refactoring is applied. In this paper, we explore one such refactoring, "Introduce explaining variable" (IEV), a low-level code based refactoring which simplifies a complex expression through the introduction of added variables. We explore the possibility that this type of refactoring, requiring manipulation of variables and constructs will have a greater association with defects than other types of refactoring. Classes where they are applied will have lower coupling levels. Five releases from two projects of Eclipse were used to support this analysis and tools to extract both the set of class refactorings and class coupling and size metrics supported the analysis. Results showed that for four out of the five releases studied, classes where the IEV refactoring had been applied were more defect-prone than other classes. Coupling in the same set of classes was higher in all five releases. Size, on the other hand, may be a confounding factor but tentative results suggest that areas of code where this refactoring had been applied are indicative of defect-prone code.
KW - Coupling
KW - Defects
KW - Refactoring
KW - Variable
UR - http://www.scopus.com/inward/record.url?scp=84961238755&partnerID=8YFLogxK
U2 - 10.1145/2764979.2764988
DO - 10.1145/2764979.2764988
M3 - Conference contribution
AN - SCOPUS:84961238755
T3 - ACM International Conference Proceeding Series
BT - Scientific Workshop Proceedings of the XP 2015 - 16th International Conference on Agile Software Development
PB - Association for Computing Machinery
T2 - 16th International Conference on Agile Software Development, XP 2015
Y2 - 25 May 2015 through 29 May 2015
ER -