Software development agents such as Claude Code, GitHub Copilot, Cursor Agent, Devin, and OpenAI Codex are being increasingly integrated into developer workflows. While prior work has evaluated agent capabilities for code completion and task automation, there is little work investigating how these agents perform Java refactoring in practice, the types of changes they make, and their impact on code quality. In this study, we present the first analysis of agentic refactoring pull requests in Java, comparing them to developer refactorings across 86 projects per group. Using RefactoringMiner and DesigniteJava 3.0, we identify refactoring types and detect code smells before and after refactoring commits. Our results show that agent refactorings are dominated by annotation changes (the 5 most common refactoring types done by agents are annotation related), in contrast to the diverse structural improvements typical of developers. Despite these differences in refactoring types, we find Cursor to be the only model to show a statistically significant increase in refactoring smells.


翻译:诸如Claude Code、GitHub Copilot、Cursor Agent、Devin和OpenAI Codex等软件开发智能体正日益融入开发者的工作流程。尽管先前的研究已评估了智能体在代码补全和任务自动化方面的能力,但很少有工作探究这些智能体在实践中如何进行Java代码重构、它们所进行的变更类型及其对代码质量的影响。在本研究中,我们首次对Java项目中由智能体发起的重构拉取请求进行了分析,并将其与开发者的重构行为进行了对比,每组涵盖86个项目。通过使用RefactoringMiner和DesigniteJava 3.0工具,我们识别了重构类型,并检测了重构提交前后的代码异味。我们的结果表明,智能体主导的重构以注解变更为主(智能体执行的最常见的5种重构类型均与注解相关),这与开发者通常进行的多样化结构性改进形成鲜明对比。尽管在重构类型上存在这些差异,我们发现Cursor是唯一一个在统计上显著增加重构异味的模型。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
智能体工程(Agent Engineering)
专知会员服务
27+阅读 · 2025年12月31日
AI智能体编程:技术、挑战与机遇综述
专知会员服务
41+阅读 · 2025年8月18日
《深度学习代码智能》综述、基准和工具集
专知会员服务
56+阅读 · 2024年1月2日
AI Agent:基于大模型的自主智能体
专知会员服务
248+阅读 · 2023年9月9日
八个不容错过的 GitHub Copilot 功能!
CSDN
11+阅读 · 2022年9月22日
浅谈群体智能——新一代AI的重要方向
中国科学院自动化研究所
44+阅读 · 2019年10月16日
尽早跑通深度学习的实践代码,是入门深度学习的最快途径
算法与数据结构
22+阅读 · 2017年12月13日
群体智能:新一代人工智能的重要方向
走向智能论坛
12+阅读 · 2017年8月16日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
23+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
48+阅读 · 2009年12月31日
VIP会员
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
23+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2013年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
48+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员