🤖 AI Summary
This study investigates how code smell interactions exacerbate inter-module static dependencies, thereby increasing system maintenance costs. Using static dependency analysis on 116 open-source Java projects, we quantitatively compare dependency distributions between modules containing interacting smell pairs (e.g., Feature Envy and Data Class) and those free of smells. Results show that isolated smells exert limited influence on dependencies, whereas interacting smell pairs significantly amplify overall dependency density—e.g., the Feature Envy–Data Class combination raises the median module dependency count from 1 to 7. Moreover, modules exhibiting interacting smell pairs exhibit, on average, 3.2× higher dependency strength than smell-free modules. This work provides the first empirical evidence that smell interactions constitute a critical mechanism driving dependency deterioration. It further advocates prioritizing the refactoring of co-occurring smell pairs over isolated ones, offering a novel, evidence-based foundation for precise, cost-effective architectural refactoring.
📝 Abstract
The existence of dependencies between modules, such as classes, can mean that changing a module triggers ripple effects that make maintenance complex and costly, so the advice is to minimize dependencies between modules. It is therefore important to understand the circumstances that can lead to increased dependencies. Recent studies suggest that code smells, which are characteristics of code that indicate potential design issues, may interact in ways that increase dependencies between modules. In this study, we aim to confirm previous observations and investigate whether and how the distribution of static dependencies changes in the presence of code smell interactions. We conducted a dependency analysis on 116 open-source Java systems to quantify the interactions, comparing interactions among code smells and interactions between code smells and non-code smells. Our results suggest that while interactions between code smell pairs are associated with increases in certain dependencies and decreases in others, overall, they are associated with an increase in total dependencies. For example, the median number of dependencies between Feature Envy methods and Data Classes is seven times as many as when the methods are non-Feature Envy methods, increasing from 1 to 7. This implies that developers should prioritize addressing code smells that interact with each other, rather than code smells that exist only in isolation.