arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.17091cs.SE
收藏

什么要删?在代理代码生成中预测不必要的方法

What to Cut? Predicting Unnecessary Methods in Agentic Code Generation

Nara Institute of Science and Technology(奈良先端科学技术大学院大学)

Kan Watanabe, Tatsuya Shirai, Yutaro Kashiwa, Hajimu Iida

AI总结:

本文提出了一种预测模型,用于识别在代理代码生成中可能被删除的功能,通过分析不同删除原因的特征,提升审查效率。

摘要:

代理编码,由GitHub Copilot和Cursor等自主代理驱动,使开发人员能够仅凭自然语言指令生成代码、测试和拉取请求。虽然这加快了实现速度,但每个拉取请求产生的代码量更大,将负担从实施者转移到了审查者。在实践中,大量AI生成的代码最终会在审查过程中被删除,但审查者仍必须检查此类代码才能决定删除。此前没有研究探索帮助审查者高效识别将被删除代码的方法。在本文中,我们提出了一种预测模型,用于识别在PR审查中可能被删除的功能。我们的结果表明,因不同原因被删除的功能表现出不同的特征,且我们的模型达到了87.1%的AUC。这些发现表明,预测方法可以帮助审查者优先处理关键代码。

英文摘要:

Agentic Coding, powered by autonomous agents such as GitHub Copilot and Cursor, enables developers to generate code, tests, and pull requests from natural language instructions alone. While this accelerates implementation, it produces larger volumes of code per pull request, shifting the burden from implementers to reviewers. In practice, a notable portion of AI-generated code is eventually deleted during review, yet reviewers must still examine such code before deciding to remove it. No prior work has explored methods to help reviewers efficiently identify code that will be removed.In this paper, we propose a prediction model that identifies functions likely to be deleted during PR review. Our results show that functions deleted for different reasons exhibit distinct characteristics, and our model achieves an AUC of 87.1%. These findings suggest that predictive approaches can help reviewers prioritize their efforts on essential code.

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

↑