RepoClean:评估编程智能体在仓库级废弃代码清理中的表现
RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup
研究团队推出 RepoClean 基准,包含来自 34 个热门开源 Python 仓库的 200 个清理任务,通过将真实仓库历史中删除的代码重新引入新版本构建。评测 7 个模型显示,表现最好的 GPT-6 Astra 也仅解决 23% 的任务。分析还发现,未明确要求清理时,智能体移除的废弃代码明显更少。
arXiv:2611.30350v1 Announce Type: cross Abstract: Large language model (LLM) agents have demonstrated strong repository-level programming capabilities. However, as software evolves, repository code may become redundant or obsolete, increasing maintenance costs and potentially introducing functional issues. Agents must therefore identify and remove unnecessary code safely, yet autonomous repository-level code cleanup remains insufficiently evaluated in isolation. To evaluate this capability, we introduce RepoClean, a benchmark of 200 cleanup tasks from 34 popular open-source Python repositories. RepoClean is constructed by automatically reintroducing deleted code from real repository histories into newer versions, preserving current implementations and retaining instances where previously passing tests consequently fail. To restore existing functionality without new feature development, agents must use repository interfaces and cross-file dependencies to determine which historical code to remove and which implementations to preserve. Evaluation of seven models shows that even the best-performing model, GPT-6 Astra, resolves only 23% of tasks. Further analysis reveals that agents remove substantially less obsolete code when cleanup is not explicitly requested. RepoClean provides a foundation for systematically studying these cleanup challenges and advancing coding agents toward autonomous software maintenance.
来源:arXiv (AI + Vision + Imaging) · arxiv.org