Skip to main content
QUICK REVIEW

[論文レビュー] The Influence of Code Smells in Efferent Neighbors on Class Stability

Zushuai Zhang, Elliott Wen|arXiv (Cornell University)|Feb 13, 2026
Software Engineering Research被引用数 0
ひとこと要約

この論文は、クラスの逸出隣接要素におけるコードスメルが、コードスメル同士の関連と静的依存関係間の相互作用を考慮しつつ、大規模リポジトリの採掘とネガティブ・ビノムIALモデルを用いて、クラスの安定性に影響を与えるかを検討する。

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.

研究の動機と目的

  • コードスメルとリップル効果の存在下で、クラスの安定性問題を動機づけ定義する。
  • 逸出隣接要素のコードスメルが焦点クラスの安定性に、焦点クラス内部のスメルを超えて影響するかを検討する。
  • コードスメルの関連性と相互作用を取り入れ、保守性への複合的な影響を理解する。
  • プロジェクト横断でのコミットベースの変更頻度と変更量を用いて安定性を測定する実証計画を提案する。

提案手法

  • 100のトップスターを獲得したGitHub Javaプロジェクトから1年間のコミット履歴を採掘する。
  • 10のコードスメルを検出(クラスレベル5つ、メソッドレベル5つ)して静的依存関係を抽出し、関連性と相互作用を特定する。
  • コミット diffs から変更頻度と変更サイズを用いてクラス安定性指標を計算する。
  • プロジェクトレベルのランダムインターセプトとコントロールを持つ負の二項一般化線形モデルを用いて安定性をモデル化する。
  • スメルの発生をクラスレベルに集約し、種別による重み付けなしで関係タイプを均一に扱う。
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.

実験結果

リサーチクエスチョン

  • RQ1RQ1: 焦点クラスにおけるコードスメルの存在数・種類が安定性に影響するか。
  • RQ2RQ2: 焦点クラスの逸出隣接要素におけるコードスメルの存在数・種類が安定性に影響するか。
  • RQ3RQ3: 逸出コードスメル結合が焦点クラスと隣接クラスの共生するスメルを考慮した場合、安定性に影響するか。
  • RQ4RQ4: 逸出コードスメルの相互作用がクラスの安定性に影響するか(相互作用の頻度と強度を含む)。

主な発見

  • 本論文は実証研究の設計と計画であり、仮説を提示する段階である。
  • 逸出隣接要素のスメルが焦点クラスの安定性を、焦点クラス内部のスメルを超えて低下させるかを検証することを目指す。
  • 安定性指標として変更頻度と変更サイズの両方を考慮する。
  • 静的依存関係全体で、スメルの関連性(共起)と相互作用(スメル間の依存関係)を考慮する。
  • 誤差を抑えるためにクラスサイズと逸出隣接要素の数をコントロールとして含める。
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

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。