paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study

探索ChatGPT在自动化代码精化中的潜力:一项实证研究
ICSE Proceedings of the IEEE/ACM 46th International Conference on Software Engineering2024匹配度 3/10 · 论文关注用 ChatGPT 完成基于代码评审的自动代码精化,属于 LLM 辅助软件工程任务,与用户画像中『在 Agentic 程序/Coding Agent 中应用分析』只有较弱的场景邻接关系;它既不做静态分析、形式化验证,也不涉及浮点或贝叶斯程序分析,且核心研究目标偏向评估 LLM 本身(且基于 ChatGPT 而非当前更强模型),与『LLM/Agent 作为工具改进程序分析』的主线不符。引用 124 inbox
Qi Guo, Junming Cao, Xiaofei Xie, Shangqing Liu, Xiaohong Li, Bihuan Chen, Xin Peng
crossref: 2026-09-12

AI 速览

一句话:首次实证评估ChatGPT在基于代码评审的自动代码精化中的表现,并分析失败原因与改进策略。

代码评审是保障软件质量和可维护性的关键活动,但耗时且易错。本文首次开展实证研究,考察ChatGPT在基于给定代码评审意见的自动代码精化任务中的能力。作者选取现有CodeReview基准并构建高质量代码评审数据集,以当前最优工具CodeReviewer作为基线进行比较。结果表明,ChatGPT在代码精化任务上优于CodeReviewer,EM和BLEU分别达到22.78和76.44,而基线仅为15.50和62.88。作者进一步分析ChatGPT表现不佳的根本原因,并提出若干缓解策略,为利用大语言模型自动化代码评审流程提供了实证洞见和潜在研究方向。

问题
代码评审耗时且容易出错,而ChatGPT等大语言模型在基于评审意见的自动代码精化任务中究竟表现如何尚不明确。
方法
构建高质量代码评审数据集,并以最先进的代码评审工具CodeReviewer为基线,对ChatGPT进行实证比较和失败案例分析。
评估
使用EM和BLEU指标评估自动代码精化效果,ChatGPT取得22.78和76.44,优于CodeReviewer的15.50和62.88,并据此提出缓解策略。
原文摘要(Abstract)

Code review is an essential activity for ensuring the quality and maintainability of software projects. However, it is a time-consuming and often error-prone task that can significantly impact the development process. Recently, ChatGPT, a cutting-edge language model, has demonstrated impressive performance in various natural language processing tasks, suggesting its potential to automate code review processes. However, it is still unclear how well ChatGPT performs in code review tasks. To fill this gap, in this paper, we conduct the first empirical study to understand the capabilities of ChatGPT in code review tasks, specifically focusing on automated code refinement based on given code reviews. To conduct the study, we select the existing benchmark CodeReview and construct a new code review dataset with high quality. We use CodeReviewer, a state-of-the-art code review tool, as a baseline for comparison with ChatGPT. Our results show that ChatGPT outperforms CodeReviewer in code refinement tasks. Specifically, our results show that ChatGPT achieves higher EM and BLEU scores of 22.78 and 76.44 respectively, while the state-of-the-art method achieves only 15.50 and 62.88 on a high-quality code review dataset. We further identify the root causes for ChatGPT's underperformance and propose several strategies to mitigate these challenges. Our study provides insights into the potential of ChatGPT in automating the code review process, and highlights the potential research directions.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot11308,
  title = {Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Study},
  author = {Qi Guo and Junming Cao and Xiaofei Xie and Shangqing Liu and Xiaohong Li and Bihuan Chen and Xin Peng},
  booktitle = {ICSE},
  year = {2024},
  doi = {10.1145/3597503.3623306}
}