An exploration of the 'introduce explaining variable' refactoring

S. Counsell, X. Liu, S. Swift, J. Buckley, M. English, S. Herold, S. Eldh, A. Ermedahl

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationScientific Workshop Proceedings of the XP 2015 - 16th International Conference on Agile Software Development
PublisherAssociation for Computing Machinery
ISBN (Electronic)9781450334099
DOIs
Publication statusPublished - 25 May 2015
Event16th International Conference on Agile Software Development, XP 2015 - Helsinki, Finland
Duration: 25 May 201529 May 2015

Publication series

NameACM International Conference Proceeding Series
Volume25-29-May-2015

Conference

Conference16th International Conference on Agile Software Development, XP 2015
Country/TerritoryFinland
CityHelsinki
Period25/05/1529/05/15

Keywords

  • Coupling
  • Defects
  • Refactoring
  • Variable

Fingerprint

Dive into the research topics of 'An exploration of the 'introduce explaining variable' refactoring'. Together they form a unique fingerprint.

Cite this