paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Towards Understanding the Characteristics of Code Generation Errors Made by Large Language Models

迈向理解大型语言模型代码生成错误的特征
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 3/10 · 该论文是对LLM代码生成错误的实证分析与分类,研究目标偏向理解LLM自身,而非将静态分析应用于LLM/Agent程序或利用LLM改进静态分析。虽与LLM生成代码的错误分析有一定关联,但缺乏形式化方法、浮点或贝叶斯程序分析等核心方向,且基于HumanEval这一常见基准。引用 19 inbox
Zhijie Wang, Zijie Zhou, Da Song, Yuheng Huang, Shengmai Chen, Lei Ma, Tianyi Zhang
crossref: 2026-09-12

AI 速览

一句话:对六个LLM在HumanEval上的代码生成错误做实证分析,建立错误分类并揭示其语义/句法特征与成因。

论文关注大语言模型生成代码时产生错误但缺乏系统理解的问题。作者在HumanEval上分析六个代表性LLM的代码生成错误,采用开放式编码与主题分析,从语义和句法两个维度归纳出错误分类,并考察错误位置、根因、与任务复杂度及测试通过率的相关性。结果显示,LLM常犯非平凡、多行且分散于不同位置的错误,根因多样;这些错误与任务复杂度和测试通过率存在关联,给定位和修复带来挑战。最后讨论了未来方向。

问题
大语言模型在代码生成中已展现强大能力,但对其产生的代码生成错误仍缺乏系统理解。
方法
在HumanEval数据集上分析六个代表性LLM,采用开放式编码和主题分析,从语义与句法两个维度构建错误分类,并分析错误位置、根因、任务复杂度与测试通过率的关系。
评估
基于六个LLM的错误数据进行定性与相关性分析,揭示错误的非平凡性、多行性和位置分散性,以及其与任务复杂度和测试通过率的关联。
原文摘要(Abstract)

Large Language Models (LLMs) have demonstrated unprecedented capabilities in code generation. However, there remains a limited understanding of code generation errors that LLMs can produce. To bridge the gap, we conducted an in-depth analysis of code generation errors across six representative LLMs on the HumanEval dataset. Specifically, we first employed open coding and thematic analysis to distill a comprehensive taxonomy of code generation errors. We analyzed two dimensions of error characteristics-semantic characteristics and syntactic characteristics. Our analysis revealed that LLMs often made non-trivial, multi-line code generation errors in various locations and with various root causes. We further analyzed the correlation between these errors and task complexity as well as test pass rate. Our findings highlighted several challenges in locating and fixing code generation errors made by LLMs. In the end, we discussed several future directions to address these challenges.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8815,
  title = {Towards Understanding the Characteristics of Code Generation Errors Made by Large Language Models},
  author = {Zhijie Wang and Zijie Zhou and Da Song and Yuheng Huang and Shengmai Chen and Lei Ma and Tianyi Zhang},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00180}
}