Do AI Agents Really Improve Code Readability?

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Horikawa, Kyogo, Horikawa, Kosei, Kashiwa, Yutaro, Uwano, Hidetake, Iida, Hajimu
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912966011518976
author Horikawa, Kyogo
Horikawa, Kosei
Kashiwa, Yutaro
Uwano, Hidetake
Iida, Hajimu
author_facet Horikawa, Kyogo
Horikawa, Kosei
Kashiwa, Yutaro
Uwano, Hidetake
Iida, Hajimu
contents Code readability is fundamental to software quality and maintainability. Poor readability extends development time, increases bug-inducing risks, and contributes to technical debt. With the rapid advancement of Large Language Models, AI agent-based approaches have emerged as a promising paradigm for automated refactoring, capable of decomposing complex tasks through autonomous planning and execution. While prior studies have examined refactoring by AI agents, these analyses cover all forms of refactoring, including performance optimization and structural improvement. As a result, the extent to which AI agent-based refactoring specifically improves code readability remains unclear. This study investigates the impact of AI agent-based refactoring on code readability. We extracted commits containing readability-related keywords from the AIDev dataset and analyzed changes in readability metrics before and after each commit, covering 403 commits evaluated using multiple quantitative metrics. Our results indicate that AI agents primarily target logic complexity (42.4%) and documentation improvements (24.2%) rather than surface-level aspects like naming conventions or formatting. However, contrary to expectations, readability-focused commits often degraded traditional quality metrics: the Maintainability Index decreased in 56.1% of commits, while Cyclomatic Complexity increased in 42.7%.
format Preprint
id arxiv_https___arxiv_org_abs_2603_13723
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Do AI Agents Really Improve Code Readability?
Horikawa, Kyogo
Horikawa, Kosei
Kashiwa, Yutaro
Uwano, Hidetake
Iida, Hajimu
Software Engineering
Code readability is fundamental to software quality and maintainability. Poor readability extends development time, increases bug-inducing risks, and contributes to technical debt. With the rapid advancement of Large Language Models, AI agent-based approaches have emerged as a promising paradigm for automated refactoring, capable of decomposing complex tasks through autonomous planning and execution. While prior studies have examined refactoring by AI agents, these analyses cover all forms of refactoring, including performance optimization and structural improvement. As a result, the extent to which AI agent-based refactoring specifically improves code readability remains unclear. This study investigates the impact of AI agent-based refactoring on code readability. We extracted commits containing readability-related keywords from the AIDev dataset and analyzed changes in readability metrics before and after each commit, covering 403 commits evaluated using multiple quantitative metrics. Our results indicate that AI agents primarily target logic complexity (42.4%) and documentation improvements (24.2%) rather than surface-level aspects like naming conventions or formatting. However, contrary to expectations, readability-focused commits often degraded traditional quality metrics: the Maintainability Index decreased in 56.1% of commits, while Cyclomatic Complexity increased in 42.7%.
title Do AI Agents Really Improve Code Readability?
topic Software Engineering
url https://arxiv.org/abs/2603.13723