Abstract
Context: Large Language Models (LLMs) are increasingly used in software engineering to enhance code quality through tasks such as refactoring and code smell detection and many other tasks. Code smells are poor design decisions that can be resolved by changing the internal structure of the code without affecting its output, a process known as refactoring. Objective: This study systematically reviews the use of LLMs in code quality enhancement, focusing on techniques such as refactoring, smell detection, and other code improvement methods. Method: Using SLR techniques, we reviewed 49 studies up to September 2024, analyzing both qualitative and quantitative data to assess trends and effectiveness. Results: The field is active, with refactoring as the most common task, followed by smell detection. Refactored code by LLMs is not reliable. Prompting is used more frequently than fine-tuning, with few-shot learning as the leading prompting method. Java and Python are the most represented languages, while F1, Precision, Recall, and Accuracy are common evaluation metrics, along with BLEU and EM for generation tasks. Open-source and general language models are preferred, with validation datasets as the primary validation approach. Conclusions: LLMs show promise for code quality improvement, but challenges in optimization and reliability remain. Future research should prioritize fine-tuning for refactoring, linking LLMs to specific quality attributes, developing benchmark datasets, constructing datasets for diverse programming languages, and exploring a wider range of promoting techniques.
| Original language | English |
|---|---|
| Article number | 107960 |
| Journal | Information and Software Technology |
| Volume | 190 |
| DOIs | |
| State | Published - Feb 2026 |
Bibliographical note
Publisher Copyright:© 2025 Elsevier B.V. All rights are reserved, including those for text and data mining, AI training, and similar technologies.
Keywords
- Code quality
- LLM
- systematic literature review
ASJC Scopus subject areas
- Software
- Information Systems
- Computer Science Applications