LLM coding agents can generate working code, but their solutions often accumulate complexity, duplication, and architectural debt. Human developers address such issues through refactoring: behavior-preserving program transformations that improve structure and maintainability. We investigate whether agents (i) can execute refactorings reliably and (ii) identify the refactorings that human developers actually chose in real codebases. To this end, we construct CodeTaste, a benchmark mined from large multi-file open-source refactorings. To score solutions, we combine repository test suites that measure functional correctness with tailored static checks that verify removal of undesired and introduction of desired code patterns using dataflow reasoning. Our results show a clear gap: agents perform well at implementing refactorings that are specified in detail, but often fail to discover the human refactoring choices when given a focus area for changes. A propose-then-implement decomposition improves alignment, and selecting the best-aligned proposal before implementation can yield further gains. CodeTaste provides an evaluation target and a potential preference signal for aligning coding agents with human refactoring decisions in realistic codebases. We release the benchmark, leaderboard, and code.
Taxonomy of migration scenarios for Qiskit refactoring using LLMs
Universidad Nacional de La Plata, Facultad de Informática Laboratorio de Investigación y Formación en Informática Avanzada (LIFIA), Argentina(拉普拉塔国立大学计算机学院高级信息技术研究与培训实验室,阿根廷)
本研究面向 Qiskit 版本迁移中的量子代码重构问题,比较专家与 LLM 构建的分类体系并整合为统一框架,以支持 AI 辅助迁移和自动化重构评估。
Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoring
University of Colorado(科罗拉多大学);Tulane University(路易斯安那州立大学);Amazon Web Services(亚马逊网络服务);JetBrains Research(JetBrains研究);NEC Corporation(日本电报电话公司);NEC Laboratories America(日本电报电话美洲实验室);University of Texas at Dallas(德克萨斯大学达拉斯分校);Concordia University(康科迪亚大学);University of Colorado, JetBrains Research(科罗拉多大学,JetBrains研究)
ACR: Adaptive Context Refactoring via Context Refactoring Operators for Multi-Turn Dialogue
Zhejiang Normal University(浙江师范大学);Alibaba Group(阿里巴巴集团);Hong Kong University of Science and Technology(香港科学与技术大学);Southeast University(东南大学);Soochow University(苏州大学)
Proof-Refactor: Refactoring Generated Formal Proofs into Modular Artifacts
Department of Mathematics, Southern University of Science and Technology(南方科技大学数学系);School of Mathematical Sciences, Peking University(北京大学数学科学学院);Center for Machine Learning Research, Peking University(北京大学机器学习研究中心)
An Empirical Study on the Potential of LLMs in Automated Software Refactoring
Beijing Institute of Technology(北京理工大学);Peking University(北京大学);University of Cincinnati(辛辛那提大学);National Innovation Institute of Defense Technology(国防科技大学创新研究院)
MergeRepair: An Exploratory Study on Merging Task-Specific Adapters in Code LLMs for Automated Program Repair
University of British Columbia, Department of Computer Science(不列颠哥伦比亚大学计算机科学系);École de technologie supérieure, Department of Software and IT Engineering(高等技术学院软件与信息技术工程系)
LintEval: Benchmarking LLMs on Linter-Guided File Refactoring
School of Computer Science, Peking University(北京大学计算机学院);Key Lab of HCST (PKU), MOE(北京大学高性能计算技术教育部重点实验室);SCS, Peking University(北京交通大学软件学院);School of Software Engineering, Beijing Jiaotong University
Humanizing Automatically Generated Unit Test Suites with LLM-Based Refactoring
University of Luxembourg(卢森堡大学);Nanjing University of Science and Technology(南京理工大学);Zhejiang University(浙江大学);Bilkent University(比尔肯特大学);Singapore Management University(新加坡管理大学)
University of Colorado(科罗拉多大学);Tulane University(路易斯安那大学);University of Texas at Dallas(德克萨斯大学达拉斯分校);NEC Corporation(日本电气通信事业株式会社);NEC Laboratories America(NEC美国实验室);JetBrains Research(JetBrains研究)
Assessing the Code Clone Detection Capability of Large Language Models
School of Computer Science, University of Galway(戈尔韦大学计算机科学学院);CRT-AI, the Science Foundation Ireland Centre for Research Training in Artificial Intelligence(爱尔兰科学基金会人工智能研究培训中心(CRT-AI));Lero, the Science Foundation Ireland Research Centre for Software(爱尔兰科学基金会软件研究中心(Lero))