How do Agents Refactor: An Empirical Study

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Ottenhof, Lukas, Penner, Daniel, Hindle, Abram, Lutellier, Thibaud
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866910252941705216
author Ottenhof, Lukas
Penner, Daniel
Hindle, Abram
Lutellier, Thibaud
author_facet Ottenhof, Lukas
Penner, Daniel
Hindle, Abram
Lutellier, Thibaud
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2601_20160
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle How do Agents Refactor: An Empirical Study
Ottenhof, Lukas
Penner, Daniel
Hindle, Abram
Lutellier, Thibaud
Software Engineering
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.
title How do Agents Refactor: An Empirical Study
topic Software Engineering
url https://arxiv.org/abs/2601.20160