High code quality, particularly in terms of maintainability, is crucial for ensuring that software remains efficient and adaptable over time, while minimizing long-term maintenance costs. As artificial intelligence continues to evolve, its application in software development offers new opportunities to improve code quality. This study investigates the use of Large Language Models (LLMs) to enhance software maintainability through code refactoring. The results indicate that LLMs can be effectively utilized for this purpose, with effectiveness varying depending on the model and the evaluation metric used. Although the study is based on a limited set of Python projects and specific prompting strategies, it provides a meaningful step toward understanding the broader applicability of LLMs in this context.

Enhancing Software Maintainability through LLM-Assisted Code Refactoring / Fulcini, Tommaso; Coppola, Riccardo; Giobergia, Flavio; Changizi, Amirali; Dashti, Meelad; Dorrani, Kimia; Amalfitano, Domenico; Distante, Damiano; Ricca, Filippo. - ELETTRONICO. - (In corso di stampa). (Intervento presentato al convegno 26th International Conference on Product-Focused Software Process Improvement tenutosi a Salerno (ITA) nel 1-3 Dicembre 2025).

Enhancing Software Maintainability through LLM-Assisted Code Refactoring

Tommaso Fulcini;Riccardo Coppola;Flavio Giobergia;Filippo Ricca
In corso di stampa

Abstract

High code quality, particularly in terms of maintainability, is crucial for ensuring that software remains efficient and adaptable over time, while minimizing long-term maintenance costs. As artificial intelligence continues to evolve, its application in software development offers new opportunities to improve code quality. This study investigates the use of Large Language Models (LLMs) to enhance software maintainability through code refactoring. The results indicate that LLMs can be effectively utilized for this purpose, with effectiveness varying depending on the model and the evaluation metric used. Although the study is based on a limited set of Python projects and specific prompting strategies, it provides a meaningful step toward understanding the broader applicability of LLMs in this context.
In corso di stampa
File in questo prodotto:
File Dimensione Formato  
Profes_paper.pdf

accesso riservato

Tipologia: 2. Post-print / Author's Accepted Manuscript
Licenza: Non Pubblico - Accesso privato/ristretto
Dimensione 662.72 kB
Formato Adobe PDF
662.72 kB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11583/3002552