How do Agents Refactor: An Empirical Study
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). First posted on arXiv 28 Jan 2026.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026To What Extent Does Agent-generated Code Require Maintenance? An Empirical Studycited by 2
- 2026"Refactoring Runaway": Understanding and Mitigating Tangled Refactorings in Coding Agents for Issue Resolutioncited by 1
- 2026(Im)Paired Programming: Coding Agents Improve Productivity but Harm Understandingcited by 1
- 2026(Im)Paired Programming: Coding Agents Improve Productivity but Harm Understanding29 Jul 2026
- 2026"Refactoring Runaway": Understanding and Mitigating Tangled Refactorings in Coding Agents for Issue Resolution21 May 2026
- 2026To What Extent Does Agent-generated Code Require Maintenance? An Empirical Study7 May 2026
Similar, not cited
Close in wording, no citation either way
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agents
- 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoring
- 2026SmellBench: Towards Fine-Grained Evaluation of Code Agents on Refactoring Tasks
- 2026RefactorPlatform: An Open-Source Harness for Controlled Evaluation of Repository-Scale Refactoring Agents
- 2026Quality and Security Signals in AI-Generated Python Refactoring Pull Requests
- 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarios
- 2026CodeTaste: Can LLMs Generate Human-Level Code Refactorings?
- 2026REFINE: A Multi-Agent LLM Approach for Evidence-Guided Code Refactoring