Abstract
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.
| Original language | English (US) |
|---|---|
| Title of host publication | Advances in Neural Information Processing Systems 36 - 37th Conference on Neural Information Processing Systems, NeurIPS 2023 |
| Editors | A. Oh, T. Neumann, A. Globerson, K. Saenko, M. Hardt, S. Levine |
| Publisher | Neural information processing systems foundation |
| ISBN (Electronic) | 9781713899921 |
| State | Published - 2023 |
| Externally published | Yes |
| Event | 37th Conference on Neural Information Processing Systems, NeurIPS 2023 - New Orleans, United States Duration: Dec 10 2023 → Dec 16 2023 |
Publication series
| Name | Advances in Neural Information Processing Systems |
|---|---|
| Volume | 36 |
| ISSN (Print) | 1049-5258 |
Conference
| Conference | 37th Conference on Neural Information Processing Systems, NeurIPS 2023 |
|---|---|
| Country/Territory | United States |
| City | New Orleans |
| Period | 12/10/23 → 12/16/23 |
Bibliographical note
Publisher Copyright:© 2023 Neural information processing systems foundation. All rights reserved.
Fingerprint
Dive into the research topics of 'Large Language Models of Code Fail at Completing Code with Potential Bugs'. Together they form a unique fingerprint.Cite this
- APA
- Standard
- Harvard
- Vancouver
- Author
- BIBTEX
- RIS