Evaluating the Effectiveness of LLMs in Fixing Maintainability Issues in Real-World Projects

要約

大規模言語モデル(Large Language Models: LLM)は、コーディングの問題に対処するために注目されているが、コードの保守性を修正するための有効性は依然として不明である。本研究では、10個のGitHubリポジトリから127の保守性問題を解決するLLMの能力を評価する。Copilot ChatとLlama 3.1ではゼロショット・プロンプトを使用し、Llamaのみでは数ショットのプロンプトを使用した。LLMが生成したソリューションは、コンパイルエラー、テストの失敗、新たな保守性の問題がないか評価されます。Llamaの少数ショット・プロンプトは44.9%のメソッドの修正に成功し、Copilot ChatとLlamaのゼロショットはそれぞれ32.29%と30%のメソッドの修正に成功した。しかし、ほとんどの解決策はエラーや新たな保守性の問題を引き起こした。また、LLMが生成した51のソリューションの可読性を評価するため、45人の参加者を対象としたヒューマン・スタディも実施した。その結果、68.63%の参加者が可読性の向上を確認した。全体として、LLMは保守性の問題を解決する可能性を示す一方で、エラーの発生は現在の限界を浮き彫りにしている。

要約(オリジナル)

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.

arxiv情報

著者 Henrique Nunes,Eduardo Figueiredo,Larissa Rocha,Sarah Nadi,Fischer Ferreira,Geanderson Esteves
発行日 2025-02-04 14:50:23+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.SE パーマリンク