paper-with-me

홈 › Papers

Bugs in Large Language Models Generated Code: An Empirical Study

2024-03-13 · Florian Tambon, Arghavan Moradi Dakhel, Amin Nikanjam, Foutse khomh, Michel C. Desmarais, Giuliano Antoniol

Large Language Models (LLMs) for code have gained significant attention recently. They can generate code in different programming languages based on provided prompts, fulfilling a long-lasting dream in Software Engineering (SE), i.e., automatic code generation. Similar to human-written code, LLM-generated code is prone to bugs, and these bugs have not yet been thoroughly examined by the community. Given the increasing adoption of LLM-based code generation tools (e.g., GitHub Copilot) in SE activities, it is critical to understand the characteristics of bugs contained in code generated by LLMs. This paper examines a sample of 333 bugs collected from code generated using three leading LLMs (i.e., CodeGen, PanGu-Coder, and Codex) and identifies the following 10 distinctive bug patterns: Misinterpretations, Syntax Error, Silly Mistake, Prompt-biased code, Missing Corner Case, Wrong Input Type, Hallucinated Object, Wrong Attribute, Incomplete Generation, and Non-Prompted Consideration. The bug patterns are presented in the form of a taxonomy. The identified bug patterns are validated using an online survey with 34 LLM practitioners and researchers. The surveyed participants generally asserted the significance and prevalence of the bug patterns. Researchers and practitioners can leverage these findings to develop effective quality assurance techniques for LLM-generated code. This study sheds light on the distinctive characteristics of LLM-generated code.

📄 PDF Abstract BibTeX arXiv:2403.08937

Code (1)

flowss/bugsinllms 공식 구현

Tasks

AttributeCode Generation

Methods 이 논문이 사용한 방법론

CodeGen CodeGen is an autoregressive transformers with next-token prediction language modeling as the learning objective trained on a natural language corpus and programming language…

Similar Papers 제목 키워드 기반

BugSpotter: Automated Generation of Code Debugging Exercises

2024-11-21 · Victor-Alexandru Pădurean, Paul Denny, Adish Singla

Debugging is an essential skill when learning to program, yet its instruction and emphasis often vary widely across introductory courses. In the era of code-generating large language models (LLMs), the ability for studen…

Large Language Models and Simple, Stupid Bugs

2023-03-20 · Kevin Jesse, Toufique Ahmed, Premkumar T. Devanbu, Emily Morgan

With the advent of powerful neural language models, AI-based systems to assist developers in coding tasks are becoming widely available; Copilot is one such system. Copilot uses Codex, a large language model (LLM), to co…

Language ModelingLanguage ModellingLarge Language Model

Synthetic Students: A Comparative Study of Bug Distribution Between Large Language Models and Computing Students

2024-10-11 · Stephen MacNeil, Magdalena Rogalska, Juho Leinonen, Paul Denny 외

Large language models (LLMs) present an exciting opportunity for generating synthetic classroom data. Such data could include code containing a typical distribution of errors, simulated student behaviour to address the c…

Anchored Self-Play for Code Repair

2026-07-03 · Caroline Choi, Zeyneb Kaya, Shirley Wu, Tengyu Ma 외 arxiv

Code repair is an important capability for language models (LMs): given a buggy program and unit tests, an LM must produce a fixed program that passes the tests. Because code repair data is limited, we aim to scale super…

Reinforcement LearningCode Repair

Design choices made by LLM-based test generators prevent them from finding bugs

2024-12-18 · Noble Saji Mathews, Meiyappan Nagappan

There is an increasing amount of research and commercial tools for automated test case generation using Large Language Models (LLMs). This paper critically examines whether recent LLM-based test generation tools, such as…

software testing