TY - JOUR
T1 - Refactoring for reuse
T2 - an empirical study
AU - Alomar, Eman Abdullah
AU - Wang, Tianjia
AU - Raut, Vaibhavi
AU - Mkaouer, Mohamed Wiem
AU - Newman, Christian
AU - Ouni, Ali
N1 - Publisher Copyright:
© 2022, The Author(s), under exclusive licence to Springer-Verlag London Ltd., part of Springer Nature.
PY - 2022/3
Y1 - 2022/3
N2 - Refactoring is the de-facto practice to optimize software health. While several studies propose refactoring strategies to optimize software design through applying design patterns and removing design defects, little is known about how developers actually refactor their code to improve its reuse. Therefore, we extract, from 1,828 open source projects, a set of refactorings that were intended to improve the software reusability. We analyze the impact of reusability refactorings on the state-of-the-art reusability metrics, and we compare the distribution of reusability refactoring types, with the distribution of the remaining mainstream refactorings. Overall, we found that the distribution of refactoring types, applied in the context of reusability, is different from the distribution of refactoring types in mainstream development. In the refactorings performed to improve reusability, source files are subject to more design level types of refactorings. Reusability refactorings significantly impact, high-level code elements, such as packages, classes, and methods, while typical refactorings, impact all code elements, including identifiers, and parameters. These findings provide practical insights into the current practice of refactoring in the context of code reuse involving the act of refactoring.
AB - Refactoring is the de-facto practice to optimize software health. While several studies propose refactoring strategies to optimize software design through applying design patterns and removing design defects, little is known about how developers actually refactor their code to improve its reuse. Therefore, we extract, from 1,828 open source projects, a set of refactorings that were intended to improve the software reusability. We analyze the impact of reusability refactorings on the state-of-the-art reusability metrics, and we compare the distribution of reusability refactoring types, with the distribution of the remaining mainstream refactorings. Overall, we found that the distribution of refactoring types, applied in the context of reusability, is different from the distribution of refactoring types in mainstream development. In the refactorings performed to improve reusability, source files are subject to more design level types of refactorings. Reusability refactorings significantly impact, high-level code elements, such as packages, classes, and methods, while typical refactorings, impact all code elements, including identifiers, and parameters. These findings provide practical insights into the current practice of refactoring in the context of code reuse involving the act of refactoring.
KW - Quality
KW - Refactoring
KW - Reusability
KW - Software metrics
UR - http://www.scopus.com/inward/record.url?scp=85123066032&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85123066032&partnerID=8YFLogxK
U2 - 10.1007/s11334-021-00422-6
DO - 10.1007/s11334-021-00422-6
M3 - Article
AN - SCOPUS:85123066032
SN - 1614-5046
VL - 18
SP - 105
EP - 135
JO - Innovations in Systems and Software Engineering
JF - Innovations in Systems and Software Engineering
IS - 1
ER -