Aug 2026· WiPiEC Journal - Works in Progress in Embedded Computing Journal· 0 citations· 34 references
TL;DR
This paper focuses on four common smells and considers five prompts of diverse complexity, asking the model for detecting and removing the identified code smells, and suggests that general-purpose LLMs cannot be reliably used for that.
Abstract
With the observed progress in machine learning (ML), and particularly the introduction of Large Language Models (LLMs), several activities related to code maintenance could be automated. That includes not only detection and evaluation of design flaws, but also code transformation and refactoring. However, the general-purpose LLMs, while being commonly used and popular, have not been specifically trained for code analysis, and may not be suitable for conducting software maintenance tasks due to biases, and inherent shortcomings of the models. In this paper, we explore if the widely available LLMs could aid the detection and the refactoring of code smells. We focus on four common smells (God Class, Long Method, Feature Envy, and Refused Bequest) and consider five prompts of diverse complexity, asking the model for detecting and removing the identified code smells. Results suggest that general-purpose LLMs cannot be reliably used for that. They can effectively detect or remove code smells only in simple cases, and frequently produce invalid code. However, their performance depends on various factors, e.g., the model, the specific code smell or the prompt objective and composition.
SmellCC, a Visual Studio Code extension that augments SonarQube with an LLM-based pipeline to automatically detect and refactor Python code smells, provides in-place, one-click remediation for the top-10 most frequent smells, effectively preventing the accumulation of technical debt during development.
Xiaoting Zhang, Yujie Zhang, Zhi-Peng Gao et al.· 0 citations
It is observed that generated code often omits basic input validation or memory-safety checks, which can lead to overflows, resource exhaustion, or other reliability/security issues, and even the largest models frequently make simple mistakes.
Rodrigo Pato Nogueira, Marco Vieira, João R. Campos· 0 citations
JavaScript is one of the most popular programming languages. As projects grow, their code can become complex which leads to code smells, signs that can indicate problems. Many tools are available to detect and fix these issues, but we need a comprehensive summary of their most important features. This paper provides a systematic literature review of JavaScript code smell detection tools. We searched four databases (Scopus, ACM Digital Library, IEEE Xplore, and Springer) using a specific search string to find relevant studies. To refine the results, we applied a four-step selection process, reducing 1002 initial studies to 18 by removing duplicates, filtering metadata, and reviewing their full texts. We then used backward and forward snowballing to find more relevant studies, increasing the total number to 27 primary studies. Finally, we examined these studies to analyze the code smell detection tools they described. We identified 22 tools, many published in top software engineering venues, such as ICSE, MSR and TSE. We found that most tools use rule-based linting (55%), which is efficient but struggles with complex architectural smells. Dynamic analysis (23%) is underused and AI-driven detection is completely missing, despite its relevance in modern software engineering research. Researchers are also developing framework-specific tools for modern JavaScript practices and focusing on the detection of test smells (22%). Most tools available to practitioners detect only basic smells and ignore deeper design issues. Tool builders can address these gaps by combining static and dynamic analysis and creating more adaptable tools. For researchers, the lack of AI-driven detection and modern benchmark datasets presents an opportunity for progress.
Unknown authors· SBC Reviews on Computer Scie...· 0 citations
Recently, Developers have been relying on AI tools to support them in their daily work by generating code. While the use of large language model-based AI tools has improved productivity, the quality of the generated code wasn't always optimal. In a lot of cases, the code includes design issues known as code smells, which negatively impact readability, maintainability, and future development. This paper investigates these issues in AI-generated Java code, with a focus on common object-oriented problems such as switch statements, temporary fields, and refused bequest. A structured approach is proposed that combines static analysis tools with explainable AI techniques to better understand why these problems appear. Based on the realized insights, prompts are optimized to guide the AI model towards generating cleaner and more structured code. The results showed clear improvement after the prompt optimization, where the number of detected code smells was reduced by 66%, and completely removed (100% reduction) in some cases. Overall, the study showed that improving prompt design, supported by explainable analysis, can significantly enhance the quality of AI-generated code.
Y. Younes, Yousef Elsheikh· IEEE Jordan Conference on Ap...· 0 citations
The study highlights the potential of intelligent, data-driven approaches to enhance software quality and support continuous code improvement by leveraging code metrics, syntactic and semantic features, and historical refactoring data.
Emily Johnson· International Journal of Mac...· 0 citations
Results indicate that static checks and test-guided, context-aware agentic repair can increase the reliability of LLM-generated refactorings, bringing them closer to practical integration within developer workflows.
Jonathan Cordeiro, Shayan Noei, Ying Zou· 1 citation
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.