Abstract
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.
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 language | English |
---|---|
Title of host publication | Proceedings - 2017 IEEE 25th International Conference on Program Comprehension, ICPC 2017 |
Place of Publication | Los Alamitos, CA |
Publisher | IEEE |
Pages | 176-185 |
Number of pages | 10 |
ISBN (Electronic) | 978-1-5386-0535-6 |
DOIs | |
Publication status | Published - 2017 |
Event | ICPC 2017: 25th IEEE International Conference on Program Comprehension - Buenos Aires, Argentina Duration: 22 May 2017 → 23 May 2017 Conference number: 25 http://icpc2017.unibas.it/ |
Conference
Conference | ICPC 2017 |
---|---|
Country/Territory | Argentina |
City | Buenos Aires |
Period | 22/05/17 → 23/05/17 |
Other | Co-located with the 39th International Conference on Software Engineering (ICSE 2017) |
Internet address |
Keywords
- Refactoring
- Code Changes
- Empirical Studies