On the Relationship Between Coupling and Refactoring: An Empirical Viewpoint
This addresses a fundamental gap in software engineering research by empirically testing assumptions about refactoring practices, though it is incremental as it builds on existing coupling metrics.
The paper investigated whether refactoring trends in software development correlate with class coupling levels, analyzing over 6,000 refactoring operations from three open-source systems, and found no meaningful difference in refactoring types applied across high or low coupling quartiles, with some refactorings for coupling removal being more common in low-coupling cases.
[Background] Refactoring has matured over the past twenty years to become part of a developer's toolkit. However, many fundamental research questions still remain largely unexplored. [Aim] The goal of this paper is to investigate the highest and lowest quartile of refactoring-based data using two coupling metrics - the Coupling between Objects metric and the more recent Conceptual Coupling between Classes metric to answer this question. Can refactoring trends and patterns be identified based on the level of class coupling? [Method] In this paper, we analyze over six thousand refactoring operations drawn from releases of three open-source systems to address one such question. [Results] Results showed no meaningful difference in the types of refactoring applied across either lower or upper quartile of coupling for both metrics; refactorings usually associated with coupling removal were actually more numerous in the lower quartile in some cases. A lack of inheritance-related refactorings across all systems was also noted. [Conclusions] The emerging message (and a perplexing one) is that developers seem to be largely indifferent to classes with high coupling when it comes to refactoring types - they treat classes with relatively low coupling in almost the same way.