The Influence of Code Smells in Efferent Neighbors on Class Stability
- URL: http://arxiv.org/abs/2602.12950v2
- Date: Mon, 16 Feb 2026 05:54:40 GMT
- Title: The Influence of Code Smells in Efferent Neighbors on Class Stability
- Abstract summary: This study investigates whether the presence of code smells in a class's efferent neighbors affects its stability.<n>We mine one year of commit history from 100 top-starred GitHub projects.<n>We detect code smells and static dependencies, determine code smell interrelation and interaction, and model these factors as predictors of class stability.
- Score: 0.6079137591620588
- License: http://creativecommons.org/licenses/by/4.0/
- 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.
Related papers
- SmellCC: A Tool for Automated Code Smells Remediation [31.421826190169284]
Code smells significantly threaten software maintainability by accumulating technical debt.<n>We present SmellCC, a Visual Studio Code extension that augments SonarQube with an LLM-based pipeline to automatically detect and remediate Python code smells.<n>SmellCC provides in-place, one-click remediation for the top-10 most frequent smells, effectively preventing the accumulation of technical debt during development.
arXiv Detail & Related papers (2026-08-10T11:45:23Z) - SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks [34.43588103259487]
SmellBench proactively injects code smells into clean code from real-world repositories.<n>It contains 294 cases spanning 7 popular smell types, 3 difficulty levels, 2 instruction settings across 7 real-world repositories.<n>Experiments show that the best combination - Qwenwen Code + Sonnet 4.5 - achieved only a 50.34 score of smell elimination.
arXiv Detail & Related papers (2026-06-04T01:49:07Z) - A Causal Perspective on Measuring, Explaining and Mitigating Smells in LLM-Generated Code [49.09545217453401]
Propensity Smelly Score (PSC) is a metric that estimates the likelihood of generating particular smell types.<n>We identify how generation strategy, model size, model architecture and prompt formulation shape the structural properties of generated code.<n> PSC helps developers interpret model behavior and assess code quality, providing evidence that smell propensity signals can support human judgement.
arXiv Detail & Related papers (2025-11-19T19:18:28Z) - Analyzing Variations in Dependency Distributions Due to Code Smell Interactions [0.6079137591620588]
Dependencies between modules can trigger ripple effects when changes are made, making maintenance complex and costly.<n>One potential factor is code smells, which are symptoms in code that indicate design issues and reduce code quality.<n>This study investigates whether and how the distribution of static dependencies changes in the presence of code smell interactions.
arXiv Detail & Related papers (2025-09-04T05:42:43Z) - A Novel Taxonomy and Classification Scheme for Code Smell Interactions [2.6597689982591044]
This study presents a novel taxonomy and a proposed classification scheme for the possible code smell interactions.<n>Experiments have been carried out using several popular machine learning (ML) models.<n>Results primarily show the presence of code smell interactions namely Inter-smell Detection within domain.
arXiv Detail & Related papers (2025-04-25T16:24:11Z) - Enforcing Fundamental Relations via Adversarial Attacks on Input Parameter Correlations [76.2226569692207]
Correlations between input parameters play a crucial role in many scientific classification tasks.<n>We present a new adversarial attack algorithm called Random Distribution Shuffle Attack (RDSA)<n>We demonstrate the RDSA effectiveness on six classification tasks.
arXiv Detail & Related papers (2025-01-09T21:45:09Z) - On the Prevalence, Evolution, and Impact of Code Smells in Simulation Modelling Software [2.608075651391582]
This paper investigates the prevalence, evolution, and impact of code smells in simulation software systems.
Certain code smells (e.g. Long Statement, Magic Number) are more prevalent in simulation software systems than in traditional software systems.
Our experiments show that some code smells such as Magic Number and Long List can survive a long time in simulation software systems.
arXiv Detail & Related papers (2024-09-06T00:47:02Z) - DualTeacher: Bridging Coexistence of Unlabelled Classes for
Semi-supervised Incremental Object Detection [53.8061502411777]
In real-world applications, an object detector often encounters object instances from new classes and needs to accommodate them effectively.
Previous work formulated this critical problem as incremental object detection (IOD), which assumes the object instances of new classes to be fully annotated in incremental data.
We consider a more realistic setting named semi-supervised IOD (SSIOD), where the object detector needs to learn new classes incrementally from a few labelled data and massive unlabelled data.
arXiv Detail & Related papers (2023-12-13T10:46:14Z) - Understanding the Detrimental Class-level Effects of Data Augmentation [63.1733767714073]
achieving optimal average accuracy comes at the cost of significantly hurting individual class accuracy by as much as 20% on ImageNet.
We present a framework for understanding how DA interacts with class-level learning dynamics.
We show that simple class-conditional augmentation strategies improve performance on the negatively affected classes.
arXiv Detail & Related papers (2023-12-07T18:37:43Z) - Task-Adaptive Saliency Guidance for Exemplar-free Class Incremental Learning [60.501201259732625]
We introduce task-adaptive saliency for EFCIL and propose a new framework, which we call Task-Adaptive Saliency Supervision (TASS)
Our experiments demonstrate that our method can better preserve saliency maps across tasks and achieve state-of-the-art results on the CIFAR-100, Tiny-ImageNet, and ImageNet-Subset EFCIL benchmarks.
arXiv Detail & Related papers (2022-12-16T02:43:52Z) - Empirical Analysis on Effectiveness of NLP Methods for Predicting Code
Smell [3.2973778921083357]
A code smell is a surface indicator of an inherent problem in the system.
We use three Extreme learning machine kernels over 629 packages to identify eight code smells.
Our findings indicate that the radial basis functional kernel performs best out of the three kernel methods with a mean accuracy of 98.52.
arXiv Detail & Related papers (2021-08-08T12:10:20Z) - Mitigating Generation Shifts for Generalized Zero-Shot Learning [52.98182124310114]
Generalized Zero-Shot Learning (GZSL) is the task of leveraging semantic information (e.g., attributes) to recognize the seen and unseen samples, where unseen classes are not observable during training.
We propose a novel Generation Shifts Mitigating Flow framework for learning unseen data synthesis efficiently and effectively.
Experimental results demonstrate that GSMFlow achieves state-of-the-art recognition performance in both conventional and generalized zero-shot settings.
arXiv Detail & Related papers (2021-07-07T11:43:59Z) - Distilling Knowledge via Knowledge Review [69.15050871776552]
We study the factor of connection path cross levels between teacher and student networks, and reveal its great importance.
For the first time in knowledge distillation, cross-stage connection paths are proposed.
Our finally designed nested and compact framework requires negligible overhead, and outperforms other methods on a variety of tasks.
arXiv Detail & Related papers (2021-04-19T04:36:24Z) - Follow Your Nose -- Which Code Smells are Worth Chasing? [0.3683202928838613]
We evaluate the influence of code smells on four metrics for quality, productivity, and bug detection efficiency.
Files without the potentially causal smells are 50% more likely to be of high quality.
Unfortunately, most smells are not removed, and developers tend to remove the easy ones and not the effective ones.
arXiv Detail & Related papers (2021-03-02T16:55:46Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.