LLM-based autonomous coding agents have reshaped software development. While these agents excel at code generation, open questions persist about the long-term maintainability of AI-generated code. This study empirically investigates the maintenance extent, human involvement, and modification types of AI-generated files versus human-authored code. Using the AIDev dataset of AI-generated pull requests and GitHub, we analyzed over 1,000 files and approximately 3,200 changes from 100 popular repositories. Our findings show that: (i) AI-generated files receive less frequent maintenance than human-authored code, with updates affecting only a small fraction of file size; (ii) the most frequent modifications to AI code are feature extensions, whereas human updates focus on bug fixes, and (iii) human developers perform the large majority of this maintenance.
翻译:基于大语言模型的自主编码智能体已重塑软件开发格局。尽管这些智能体在代码生成方面表现出色,但关于AI生成代码长期可维护性的开放性问题依然存在。本研究通过实证对比AI生成文件与人工编写代码的维护程度、人工参与度及修改类型,利用包含AI生成拉取请求的AIDev数据集及GitHub平台,对来自100个热门代码仓库的超过1000个文件及约3200次变更进行了分析。研究结果表明:(i)AI生成文件的维护频率低于人工编写代码,且更新仅影响文件的一小部分;(ii)AI代码最常见的修改类型是功能扩展,而人工更新则侧重于错误修复;(iii)绝大多数维护工作由人类开发者完成。