arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.04886cs.SEcs.AI
收藏

分析AI编码代理生成的拉取请求中的消息-代码不一致

Analyzing Message-Code Inconsistency in AI Coding Agent-Authored Pull Requests

King's College London(伦敦大学国王学院);University of Trieste(特里斯特大学);Harbin Normal University(哈尔滨师范大学)

Jingzhi Gong, Giovanni Pinna, Yixin Bian, Jie M. Zhang

AI总结:

研究发现AI生成的PR描述中存在显著的消息-代码不一致问题,导致接受率降低和合并时间延长,需加强验证机制和生成优化以提升人机协作的可信度。

摘要:

拉取请求(PR)描述由AI编码代理生成,是向人类审阅者传达代码变更的主要渠道。然而,这些消息与实际变更之间的匹配情况尚未被探索,引发了对AI代理可信度的担忧。为填补这一空白,我们分析了五个代理生成的23,247个agentic PRs,使用PR消息-代码不一致(PR-MCI)进行分析。我们贡献了974个手动标注的PRs,发现406个PRs(1.7%)表现出高PR-MCI,识别出八种PR-MCI类型,揭示“描述声称未实现的变更”是最常见的问题(45.4%)。统计检验证实,高MCI PRs的接受率降低了51.7%(28.3% vs. 80.0%),合并时间延长了3.5倍(55.8 vs. 16.0小时)。我们的发现表明,不可靠的PR描述会损害对AI代理的信任,强调了PR-MCI验证机制和改进PR生成的必要性,以实现可信的人机协作。

英文摘要:

Pull request (PR) descriptions generated by AI coding agents are the primary channel for communicating code changes to human reviewers. However, the alignment between these messages and the actual changes remains unexplored, raising concerns about the trustworthiness of AI agents. To fill this gap, we analyzed 23,247 agentic PRs across five agents using PR message-code inconsistency (PR-MCI). We contributed 974 manually annotated PRs, found 406 PRs (1.7%) exhibited high PR-MCI, and identified eight PR-MCI types, revealing that "descriptions claim unimplemented changes" was the most common issue (45.4%). Statistical tests confirmed that high-MCI PRs had 51.7% lower acceptance rates (28.3% vs. 80.0%) and took 3.5 times longer to merge (55.8 vs. 16.0 hours). Our findings suggest that unreliable PR descriptions undermine trust in AI agents, highlighting the need for PR-MCI verification mechanisms and improved PR generation to enable trustworthy human-AI collaboration.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑