An Exploratory Study on the Relationship between Changes and Refactoring

Fabio Palomba, Andy Zaidman, Rocco Oliveto, Andrea De Lucia

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

28 Citations (Scopus)
41 Downloads (Pure)


Refactoring aims at improving the internal structure of a software system without changing its external behavior. Previous studies empirically assessed, on the one hand, the benefits of refactoring in terms of code quality and developers’
productivity, and on the other hand, the underlying reasons that push programmers to apply refactoring. Results achieved in the latter investigations indicate that besides personal motivation such as the responsibility concerned with code authorship, refactoring is mainly performed as a consequence of changes in the requirements rather than driven by software quality. However,
these findings have been derived by surveying developers, and therefore no software repository study has been carried out to corroborate the achieved findings. To bridge this gap, we provide a quantitative investigation on the relationship between different types of code changes (i.e., Fault Repairing Modification, Feature Introduction Modification, and General Maintenance Modification) and 28 different refactoring types coming from 3 open source projects. Results showed that developers tend to apply a higher number of refactoring operations aimed at improving maintainability and comprehensibility of the source code when fixing bugs. Instead, when new features are implemented, more complex refactoring operations are performed to improve code cohesion. Most of the times, the underlying reasons behind the application of such refactoring operations are represented by the presence of duplicate code or previously introduced self-admitted technical debts.
Original languageEnglish
Title of host publicationProceedings - 2017 IEEE 25th International Conference on Program Comprehension, ICPC 2017
Place of PublicationLos Alamitos, CA
Number of pages10
ISBN (Electronic)978-1-5386-0535-6
Publication statusPublished - 2017
EventICPC 2017: 25th IEEE International Conference on Program Comprehension - Buenos Aires, Argentina
Duration: 22 May 201723 May 2017
Conference number: 25


ConferenceICPC 2017
CityBuenos Aires
OtherCo-located with the 39th International Conference on Software Engineering (ICSE 2017)
Internet address


  • Refactoring
  • Code Changes
  • Empirical Studies

Fingerprint Dive into the research topics of 'An Exploratory Study on the Relationship between Changes and Refactoring'. Together they form a unique fingerprint.

Cite this