Skip to main content
QUICK REVIEW

[Paper Review] The Influence of Code Smells in Efferent Neighbors on Class Stability

Zushuai Zhang, Elliott Wen|arXiv (Cornell University)|Feb 13, 2026
Software Engineering ResearchComputer Science0 citations
TL;DR

The paper investigates whether code smells in a class’s efferent neighbors affect that class’s stability, accounting for code smell interrelation and interaction across static dependencies, using large-scale repository mining and negative binomial models.

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.

Motivation & Objective

  • Motivate and define the problem of class stability in the presence of code smells and ripple effects through efferent neighbors.
  • Examine how code smells in efferent neighbors influence a focal class’s stability, beyond smells inside the focal class.
  • Incorporate code smell interrelation and interaction to understand compounded maintainability impacts.
  • Propose an empirical plan to measure stability using commit-based change frequency and change size across projects.

Proposed method

  • Mine one year of commit history from 100 top-starred GitHub Java projects.
  • Detect ten code smells (five class-level, five method-level) and extract static dependencies to identify interrelation and interaction.
  • Compute class stability metrics: change frequency and change size from commit diffs.
  • Model stability using negative binomial generalized linear models with project-level random intercepts and controls.
  • Aggregate smell instances to class level and treat dependencies uniformly across relation types without weighting by type.
Figure 1. Example of efferent neighbors: class $C$ depends on $N_{1}$ and $N_{2}$ via outgoing dependencies.
Figure 1. Example of efferent neighbors: class $C$ depends on $N_{1}$ and $N_{2}$ via outgoing dependencies.

Experimental results

Research questions

  • RQ1RQ1: Does the existence, number, or variety of code smells in a focal class influence its stability?
  • RQ2RQ2: Does the existence, number, or variety of code smells in a focal class’s efferent neighbors influence its stability?
  • RQ3RQ3: Does efferent code smell coupling influence a class’s stability, considering confounding smells in the focal class and neighbors?
  • RQ4RQ4: Does efferent code smell interaction influence a class’s stability, including counts and intensities of such interactions?

Key findings

  • As this is a design and plan for an empirical study, the paper outlines hypotheses rather than reporting results.
  • The study aims to test whether smells in efferent neighbors reduce focal class stability beyond intrinsic smells.
  • It considers both change frequency and change size as stability measures.
  • It accounts for code smell interrelation (collocation) and interaction (dependencies between smells) across static dependencies.
  • Controls include class size and number of efferent neighbors to reduce confounding.
Figure 2. Examples of interrelations and interactions between a method-level code smell instance CS1 (expressed as a blue square inside class C1) and a class-level code smell instance CS2 (expressed as the entire class colored in blue): (A) coupled but non-interacting code smells; (B) coupled and in
Figure 2. Examples of interrelations and interactions between a method-level code smell instance CS1 (expressed as a blue square inside class C1) and a class-level code smell instance CS2 (expressed as the entire class colored in blue): (A) coupled but non-interacting code smells; (B) coupled and in

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.