Skip to main content
QUICK REVIEW

[논문 리뷰] The Influence of Code Smells in Efferent Neighbors on Class Stability

Zushuai Zhang, Elliott Wen|arXiv (Cornell University)|2026. 02. 13.
Software Engineering Research인용 수 0
한 줄 요약

이 논문은 클래스의 efferent 이웃에 있는 코드 냄새가 해당 클래스의 안정성에 영향을 주는지, 코드 냄새 간의 상관관계와 정적 의존성 간의 상호작용을 고려하여 대규모 저장소 마이닝과 음의 이항 모델을 사용해 조사한다.

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.

연구 동기 및 목표

  • 코드 냄새와 efferent 이웃을 통한 ripple 효과의 존재를 문제 정의와 함께 클래스 안정성의 문제를 제시한다.
  • 초점 클래스 내부의 냄새를 넘어 efferent 이웃의 코드 냄새가 초점 클래스의 안정성에 어떤 영향을 주는지 살펴본다.
  • 코드 냄새 간의 상관관계 및 상호작용을 반영하여 유지보수성에 대한 축적된 영향을 이해한다.
  • 프로젝트 간 커밋 기반 변경 빈도 및 변경 크기를 사용하여 안정성을 측정하는 경험적 계획을 제안한다.

제안 방법

  • 100개의 최고-Star를 받는 GitHub Java 프로젝트에서 1년의 커밋 이력을 채굴한다.
  • 10개의 코드 냄새를 탐지(클래스 수준 5개, 메서드 수준 5개)하고 정적 의존성을 추출하여 상관관계와 상호작용을 식별한다.
  • 커밋 차이에서 변경 빈도와 변경 크기로 클래스 안정성 지표를 계산한다.
  • 프로젝트 수준의 무작위 절편과 제어 변수를 사용한 음의 이항 일반화 선형 모형으로 안정성을 모델링한다.
  • 냄새 인스턴스를 클래스 수준으로 집계하고 관계 유형별 가중치 없이 의존성을 균일하게 취급한다.
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: 초점 클래스의 efferent 이웃에 존재하는 코드 냄새의 수와 다양성이 그 안정성에 영향을 주는가?
  • RQ3RQ3: efferent 코드 냄새 결합이 초점 클래스와 이웃의 냄새에 대한 혼란 요인을 고려할 때 클래스의 안정성에 영향을 주는가?
  • RQ4RQ4: efferent 코드 냄새 상호작용이 그러한 상호작용의 수와 강도를 포함하여 클래스의 안정성에 영향을 주는가?

주요 결과

  • 이 논문은 경험적 연구를 위한 설계 및 계획이므로 결과를 보고하기보다는 가설을 제시한다.
  • 연구의 목표는 efferent 이웃의 냄새가 초점 클래스의 안정성을 내부 냄새를 넘어 감소시키는지 여부를 시험하는 것이다.
  • 변경 빈도와 변경 크기를 안정성 측정으로 모두 고려한다.
  • 정적 의존성 전반에 걸쳐 코드 냄새의 상관관계(동시 등장)와 상호작용(냄새 간의 의존성)을 고려한다.
  • 교란 요인을 줄이기 위해 클래스 크기와 efferent 이웃의 수를 포함한 제어 변수를 포함한다.
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가 만들고, 인간 에디터가 검토했습니다.