Jul 2026· International Conference on Artificial Intelligence Testing· pp. 50-55· 0 citations· 34 references
Abstract
Continuous Integration and Continuous Delivery (CI/CD) pipelines accelerate software evolution but complicate the timely assessment of structural degradation. While code smells effectively indicate maintainability risks, their detection remains largely confined to isolated static analysis rather than being actively integrated into continuous workflows. To address this gap, we propose an explainable AI-driven approach for code smell classification designed specifically for software quality risk analysis in CI/CD environments. Using structural metrics related to complexity, coupling, and cohesion, we train a Random Forest model to classify four prevalent smells: Blob, Long Method, Feature Envy, and Data Class. Evaluated on labeled Java systems, our approach successfully captures the structural patterns indicative of software decay, achieving 82% accuracy and a 0.86 macro F1-score. Beyond raw performance, we operationalize these classifications as interpretable risk indicators within a prototype CI/CD pipeline, prioritizing human-centered evaluation. Ultimately, this work advances the AI for Software Engineering (AI4SE) domain by demonstrating how explainable machine learning can practically augment continuous quality assurance in agile development.
Code smells significantly threaten software maintainability by accumulating technical debt, yet developers often lack the resources to manually address these flaws under tight release schedules. While static analysis tools like SonarQube provide precise detection, they function largely as passive alert systems, leaving the burden of refactoring on developers. To bridge this gap, we present a novel cleaning tool, namely SmellCC, a Visual Studio Code extension that augments SonarQube with an LLM-based pipeline to automatically detect and refactor Python code smells. By employing Chain-of-Thought (CoT) and few-shot learning, SmellCC provides in-place, one-click remediation for the top-10 most frequent smells, effectively preventing the accumulation of technical debt during development. Our quantitative evaluation demonstrates that our SmellCC is promising in helping developers effectively eliminate code smells (96.8\% cleaning rate) with high accuracy (i.e., 91.3\%), ensuring that the refactored code remains syntactically correct and behavior-preserving, thereby significantly improving long-term software maintainability.
Xiaoting Zhang, Yujie Zhang, Zhipeng Gao et al.· 0 citations
: The growing adoption of large language models (LLMs) in software engineering has introduced new opportunities but also risks in the software maintenance lifecycle. While LLMs can generate entire codebases from natural language prompts, such automatically generated or rapidly prototyped code often accumulates structural debt, making systematic refactoring increasingly urgent. This work investigates LLMs as metric-driven refactoring assistants rather than code generators. Six models (ChatGPT, Claude, Gemini, Grok, DeepSeek, and Qwen) were evaluated on two types of Java projects: three controlled applications with manually inflated structural metrics, and three real-world applications from public GitHub repositories. Using MetricsReloaded in IntelliJ IDEA, we measured four CK metrics: complexity (WMC), cohesion (LCOM), coupling (CBO), and inheritance depth (DIT). Results indicate that LLMs significantly reduce complexity and coupling, improving class simplicity and modularity. However, cohesion improvements remained limited, with LCOM proving especially elusive. Inheritance depth showed strong reductions in synthetic high-metric applications but minimal change in real projects. ChatGPT produced the most consistent and structurally stable refactoring outputs in real applications, though occasional cohesion deterioration occurred. These findings suggest that while LLMs are valuable assistants for structural improvement, their interventions require careful monitoring to avoid unintended trade-offs.
Tindwende Sawadogo, Fadel Touré· Proceedings of the 21st Inte...· 0 citations
AI-generated C++ code has a distinct quality profile, showing higher rates of interface and coupling burdens, copy and allocation overheads, and a reliance on explicit loops over optimized standard APIs, which translates into tangible downstream costs, including increased review effort and a 5-8% increase in compute resource consumption.
Michael Tran, Fred Lewis, Kun Yang et al.· 1 citation
Results show that ML-enhanced recommendations outperform traditional methods in accuracy, relevance, and impact on maintainability metrics, and highlight the potential of integrating ML into modern development practices to support developers in producing cleaner, more maintainable software systems.
Rohit Malhotra· International Journal of Mod...· 0 citations
Software defect prediction historically relies on code and history metrics, largely ignoring developer-level indicators. Yet, because defects typically stem from human error, human-factors theory offers complementary, theoretically grounded predictors. This paper introduces a framework for deriving prediction metrics from human-factors theory and instantiates it with two metrics, alertness and memory_decay, operationalizing developer cognitive state during code editing. We evaluate these metrics on twenty-one large-scale open-source projects under two complementary protocols: a discovery-oriented (in-sample) evaluation and a time-aware generalization evaluation on a subset of eighteen projects. Under discovery evaluation, models using cognitive metrics dominate state-of-the-art baselines on every project (PR-AUC 0.64 vs. 0.43), and have surfaced over thirty real, previously-unreported defects across nine critical infrastructure projects, including two assigned CVEs and accepted upstream fixes in systems such as NASA Trick. Under time-aware cross-project evaluation, cognitive metrics encode the strongest cross-project predictive signal in the benchmark: alertness ranks first by mean SHAP importance and memory_decay exhibits the lowest rank volatility, a stability independently confirmed by chance-corrected selection-stability analysis; the configuration combining cognitive and traditional metrics significantly outperforms the traditional baseline alone (Holm-corrected \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p = 0.018$$\end{document}, large effect). Furthermore, cognitive configurations demonstrate a significant, large-effect reverse generalization gap—performing better under cross-project transfer than within-project evaluation—while substituting traditional edit-frequency counts to produce calibration-neutral models. Consequently, our findings validate cognitive theory for explainable, actionable, and interpretable safety-critical defect prediction, laying empirical groundwork to evaluate analogous issues in LLM-generated code through the behavioral study of AI.
Carlos Andrés Ramírez Cataño, Makoto Itoh· International Conference on...· 0 citations
Docker simplifies application deployment, yet improperly written Dockerfiles often lead to suboptimal images with security and efficiency issues, termed “Docker smell”. Existing approaches for the identification and repair of Docker smells predominantly rely on expert-defined static rules, which exhibit notable limitations when addressing structurally complex or infrequent smells. This paper proposes a novel Detect–Guide–Repair (DGR) framework, which integrates rule-based smell detection with a context-aware repair mechanism driven by large language models (LLMs), enabling a more flexible and intelligent automated repair process. We systematically evaluated DGR on 417 real Dockerfiles from prominent GitHub projects. Experimental results show that DGR reduces the number of smells to 44.68% of the original while maintaining a build success rate of 89.20%, demonstrating significant improvements in both repair effectiveness and usability. Furthermore, we present three practical enhancement pathways: (1) a hybrid strategy combining rules and DGR to improve repair effectiveness further; (2) an automated error-correction mechanism to restore buildability; and (3) task-specific model fine-tuning to enable efficient deployment of smaller models. Collectively, these approaches provide a promising empirical foundation for automated Docker smell repair.