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

  • Tommaso Fulcini,
  • Riccardo Coppola,
  • Flavio Giobergia,
  • Amirali Changizi,
  • Meelad Dashti,
  • Kimia Dorrani,
  • Domenico Amalfitano,
  • Damiano Distante,
  • Filippo Ricca

摘要

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.