Empirical Study on Refactoring Large-scale Industrial Systems and Its Effects on Maintainability

TitleEmpirical Study on Refactoring Large-scale Industrial Systems and Its Effects on Maintainability
Publication TypeJournal Article
Year of Publication2017
AuthorsSzőke G, Antal G, Nagy C, Ferenc R, Gyimóthy T
JournalJournal of Systems and Software
Volume129
Pagination107–126
Date Publishedjul
ISSN0164-1212
KeywordsAntipatterns, coding issues, ISO/IEC 25010, maintainability, refactoring, software quality
Abstract

We examine hundreds of manual refactoring commits from large-scale industrial systems.We study the effects of these commits on source code using a maintainability model.Developers preferred to fix concrete coding issues rather than fix code smells.A single refactoring had only a small impact (sometimes even negative effect).Whole refactoring process has significant beneficial effect on the maintainability. Software evolves continuously, it gets modified, enhanced, and new requirements always arise. If we do not spend time occasionally on improving our source code, its maintainability will inevitably decrease. The literature tells us that we can improve the maintainability of a software system by regularly refactoring it. But does refactoring really increase software maintainability? Can it happen that refactoring decreases the maintainability? Empirical studies show contradicting answers to these questions and there have been only a few studies which were performed in a large-scale, industrial context. In our paper, we assess these questions in an in vivo context, where we analyzed the source code and measured the maintainability of 6 large-scale, proprietary software systems in their manual refactoring phase. We analyzed 2.5 million lines of code and studied the effects on maintainability of 315 refactoring commits which fixed 1273 coding issues. We found that single refactorings only make a very little difference (sometimes even decrease maintainability), but a whole refactoring period, in general, can significantly increase maintainability, which can result not only in the local, but also in the global improvement of the code.

URLhttp://www.sciencedirect.com/science/article/pii/S0164121216301558?via%3Dihub
DOI10.1016/j.jss.2016.08.071