How Do Developers Refactor Code to Improve Code Reusability?

Eman Abdullah AlOmar, Philip T. Rodriguez, Jordan Bowman, Tianjia Wang, Benjamin Adepoju, Kevin Lopez, Christian Newman, Ali Ouni, Mohamed Wiem Mkaouer

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

14 Scopus citations

Abstract

Refactoring is the de-facto practice to optimize software health. While there has been several studies proposing 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 which were intended to improve the software reusability. We analyze the impact of reusability refactorings on 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.

Original languageEnglish
Title of host publicationReuse in Emerging Software Engineering Practices - 19th International Conference on Software and Systems Reuse, ICSR 2020, Proceedings
EditorsSihem Ben Sassi, Sihem Ben Sassi, Stéphane Ducasse, Hafedh Mili
Pages261-276
Number of pages16
DOIs
StatePublished - 2020
Event19th International Conference on Software and Systems Reuse, ICSR 2020 - Hammamet, Tunisia
Duration: 2 Dec 20204 Dec 2020

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12541 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference19th International Conference on Software and Systems Reuse, ICSR 2020
Country/TerritoryTunisia
CityHammamet
Period2/12/204/12/20

Keywords

  • Quality
  • Refactoring
  • Reusability
  • Software metrics

Fingerprint

Dive into the research topics of 'How Do Developers Refactor Code to Improve Code Reusability?'. Together they form a unique fingerprint.

Cite this