Empirical study on refactoring large-scale industrial systems and its effects on maintainability

•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 (so...

Full description

Saved in:
Bibliographic Details
Published in:The Journal of systems and software Vol. 129; pp. 107 - 126
Main Authors: Szőke, Gábor, Antal, Gábor, Nagy, Csaba, Ferenc, Rudolf, Gyimóthy, Tibor
Format: Journal Article
Language:English
Published: Elsevier Inc 01-07-2017
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:•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.
ISSN:0164-1212
1873-1228
DOI:10.1016/j.jss.2016.08.071