← ALB News · curated headline

The Influence of Code Smells in Efferent Neighbors on Class Stability

arXiv Software Engineering · WORLD · Compilers · 10/26/2026, 12:00:00 AM

arXiv:2602.12950v3 Announce Type: replace 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, a class can change because its efferent neighbors (i.e., the classes it depends 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 efferent neighbors exhibit code smells. Therefore, this study investigates whether code smells in a class's efferent neighbors affect its stability. We mined one year of commit history from 152 top-starred GitHub Java projects, detected code smells and static dependencies, and modeled their associations with class stability. Our results challenge the practice of examining code smells only within the class being maintained by showing that this provides an incomplete view of stability risk. Specifically, considering code smells in efferent neighbors reveals stability risks that are not observed when examining code smells in the class itself. Moreover, considering smells in both the class and its efferent neighbors, as well as their relationships across dependencies, reveals further stability risks that are not observed when smells at these two locations are analyzed separately. Consequently, these findings suggest that code smell analysis for class maintenance should extend beyond the class being maintained to the classes on which it depends.

Continue to arXiv Software Engineering →

You are being forwarded in 6s — stay on this page