Large Language Models of Code Fail at Completing Code with Potential Bugs

要約

コードの大規模言語モデル(Code-LLM)は近年、プログラミング支援やコードインテリジェンスの基本機能であるコード補完に多大な進歩をもたらしている。しかしながら、ほとんどの既存の研究は、ソフトウェア開発において不可避である、生成のためのコードコンテキストにおけるバグの存在の可能性を無視している。そこで我々は、コードコンテキストに潜在的なバグ(完成したプログラムのバグとなりうるアンチパターン)が含まれる、リアルタイムコード提案の現実的なシナリオに着想を得て、バグを含むコード補完問題を導入し、研究する。1つは、セマンティクスを変更するオペレータの変更に由来する合成バグ(buggy-HumanEval)であり、もう1つは、コーディング問題に対するユーザの投稿に由来する現実的なバグ(buggy-FixEval)である。我々は、潜在的なバグの存在が、高性能なCODE-LLMの生成性能を著しく低下させることを発見した。例えば、buggy-HumanEvalのテストケースに対するCODEGEN-2B-MONOの合格率は、コンテキストに潜在的なバグが1つあると50%以上低下する。最後に、潜在的バグの悪影響を緩和するためのいくつかのポストホックメソッドを調査し、ポストミティゲーション性能に大きなギャップが残っていることを発見した。

要約(オリジナル)

Large language models of code (Code-LLMs) have recently brought tremendous advances to code completion, a fundamental feature of programming assistance and code intelligence. However, most existing works ignore the possible presence of bugs in the code context for generation, which are inevitable in software development. Therefore, we introduce and study the buggy-code completion problem, inspired by the realistic scenario of real-time code suggestion where the code context contains potential bugs — anti-patterns that can become bugs in the completed program. To systematically study the task, we introduce two datasets: one with synthetic bugs derived from semantics-altering operator changes (buggy-HumanEval) and one with realistic bugs derived from user submissions to coding problems (buggy-FixEval). We find that the presence of potential bugs significantly degrades the generation performance of the high-performing Code-LLMs. For instance, the passing rates of CODEGEN-2B-MONO on test cases of buggy-HumanEval drop more than 50% given a single potential bug in the context. Finally, we investigate several post-hoc methods for mitigating the adverse effect of potential bugs and find that there remains a significant gap in post-mitigation performance.

arxiv情報

著者 Tuan Dinh,Jinman Zhao,Samson Tan,Renato Negrinho,Leonard Lausen,Sheng Zha,George Karypis
発行日 2023-12-01 01:27:37+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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