The Influence of Code Smells in Efferent Neighbors on Class Stability
Preprint
Abstract
Understanding what drives code instability is essential for effective software maintenance, as unstable classes require larger or more frequent edits and increase the risk of unintended side effects. Although code smells are widely believed to harm maintainability, most prior stability studies examine only the smells within the class being modified. In practice, however, classes can change because their efferent neighbors (i.e., the classes they depend on) are modified due to ripple effects that propagate along static dependencies, even if the class itself is clean. Such ripple effects may be more severe when the efferent neighbor exhibits code smells. In addition, code smells rarely occur alone. They often appear together within a class or across classes connected by static dependencies, a phenomenon known as code smell interrelation. Such interrelation can lead to code smell interaction, where smells are directly connected through static dependencies and may further compound maintainability issues. However, the effect of code smell interrelation and interaction on code quality remains largely underexplored. Therefore, this study investigates whether the presence of code smells in a class's efferent neighbors affects its stability, considering the factor of code smell interrelation and interaction. To achieve this, we mine one year of commit history from 100 top-starred GitHub projects, detect code smells and static dependencies, determine code smell interrelation and interaction, and model these factors as predictors of class stability.Keywords
All Related Versions
This publication has 22 references indexed in Scilit:
- An exploratory evaluation of code smell agglomerationsSoftware Quality Journal, 2024
- On the evolution and impact of architectural smells—an industrial case studyEmpirical Software Engineering, 2022
- A longitudinal exploratory study on code smells in server side web applicationsSoftware Quality Journal, 2021
- Individual differences limit predicting well-being and productivity using software repositories: a longitudinal industrial studyEmpirical Software Engineering, 2021
- A Systematic Literature Review on Empirical Analysis of the Relationship Between Code Smells and Software Quality AttributesArchives of Computational Methods in Engineering, 2019
- A large-scale empirical study on the lifecycle of code smell co-occurrencesInformation and Software Technology, 2018
- On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigationEmpirical Software Engineering, 2017
- An in-depth study of the promises and perils of mining GitHubEmpirical Software Engineering, 2015
- An empirical study of the bad smells and class error probability in the post-release object-oriented system evolutionJournal of Systems and Software, 2007
- Refactoring: Improving the Design of Existing Code2002