Search papers, labs, and topics across Lattice.
This paper introduces SmellCC, a Visual Studio Code extension that enhances SonarQube's capabilities by integrating an LLM-based pipeline for the automatic detection and remediation of Python code smells. By utilizing Chain-of-Thought (CoT) reasoning and few-shot learning, SmellCC enables developers to achieve a 96.8% cleaning rate for the top-10 most common code smells with a high accuracy of 91.3%, ensuring that the refactored code remains both syntactically correct and behavior-preserving. This tool addresses the critical issue of technical debt accumulation, allowing developers to maintain software quality without compromising on tight release schedules.
A single click with SmellCC can eliminate 96.8% of Python code smells, transforming how developers manage technical debt.
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.