计算机科学 > 软件工程
[提交于 2025年2月5日]
标题:Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projects
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Large Language Models (LLMs) have gained attention for addressing coding problems, but their effectiveness in fixing code maintainability remains unclear. This study evaluates LLMs capability to resolve 127 maintainability issues from 10 GitHub repositories. We use zero-shot prompting for Copilot Chat and Llama 3.1, and few-shot prompting with Llama only. The LLM-generated solutions are assessed for compilation errors, test failures, and new maintainability problems. Llama with few-shot prompting successfully fixed 44.9% of the methods, while Copilot Chat and Llama zero-shot fixed 32.29% and 30%, respectively. However, most solutions introduced errors or new maintainability issues. We also conducted a human study with 45 participants to evaluate the readability of 51 LLM-generated solutions. The human study showed that 68.63% of participants observed improved readability. Overall, while LLMs show potential for fixing maintainability issues, their introduction of errors highlights their current limitations.
提交历史
来自:Henrique Nunes[v1] 2025年2月5日 星期三 00:00:00 UTC