SmellCC: A Tool for Automated Code Smells Remediation

📅 2026-08-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work proposes SmellCC, a VS Code plugin that integrates SonarQube with large language models to automatically detect and refactor code smells in Python, addressing the limitation of existing static analysis tools that identify but cannot fix such issues. By introducing chain-of-thought reasoning and few-shot learning into the automated repair process, SmellCC establishes a closed-loop detection-and-repair pipeline capable of one-click refactoring for ten common code smells. Experimental results demonstrate that the approach achieves a repair rate of 96.8% and an accuracy of 91.3%, while preserving syntactic correctness and behavioral consistency. This significantly reduces developer effort and enhances the long-term maintainability of software systems.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

code smells
technical debt
software maintainability
refactoring
Innovation

Methods, ideas, or system contributions that make the work stand out.

Code Smells
LLM-based Refactoring
Chain-of-Thought
Few-shot Learning
Automated Remediation
🔎 Similar Papers
No similar papers found.