FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration
Google(谷歌);Max Planck Institut für Intelligente Systeme (MPI-IS)(马克斯·普朗克智能系统研究所);ELLIS Institute, Tübingen(图宾根ELLIS研究所);Salesforce;Gologic Inc(Gologic公司)
Victor May, Diganta Misra, Yanqi Luo, Anjali Sridhar, Justine Gehring, Silvio Soares Ribeiro Junior
备注:
18 pages, 12 figures
发表信息:
ICSE '26: Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering
AI coding assistants are rapidly becoming integral to modern software development. A key challenge in this space is the continual need to migrate and modernize codebases in response to evolving software ecosystems. Traditionally, such migrations have relied on rule-based systems and human intervention. With the advent of powerful large language models (LLMs), AI-driven agentic frameworks offer a promising alternative-but their effectiveness has not been systematically evaluated. In this paper, we introduce \FreshBrew{}\footnote{\url{https://github.com/mrcabbage972/freshbrew}}, a novel benchmark for evaluating AI agents on project-level Java migrations, with a specific focus on measuring an agent's ability to preserve program semantics and avoid reward hacking, which we argue requires projects with high test coverage for a rigorous and reliable evaluation. We benchmark several state-of-the-art LLMs, and compare their performance against established rule-based tools. Our evaluation on a challenging subset of 228 public Maven repositories that build on JDK 8, fail on JDK 17, and have high test coverage shows that the top-performing model, Gemini 2.5 Flash, can successfully migrate 52.3\% of projects to JDK 17. Our empirical analysis reveals novel insights into the critical strengths and limitations of current agentic approaches, offering actionable insights into their real-world applicability. Our empirical study reveals failure modes of current AI agents in realistic Java modernization tasks, providing a foundation for evaluating trustworthy code-migration systems. By releasing \FreshBrew{}, we aim to facilitate rigorous, reproducible evaluation and catalyze progress in AI-driven codebase modernization.
Why did developers migrate Android applications from Java to Kotlin?
目前,大多数在移动设备上运行的应用程序都是用Java开发的Android应用程序。然而,开发人员现在可以使用一种新的程序设计语言编写Android应用程序:Kotlin,谷歌在2017年将其作为开发Android应用程序的官方程序设计语言。从那时起,Android开发人员已经能够:a)使用Kotlin从头开始编写Android应用程序,b)通过添加Kotlin代码(可能归功于两种语言之间的互操作性)来改进现有的Java Android应用程序,或者c)将其Android应用程序从Java迁移到Kotlin。本文旨在研究这最后一种情况。我们进行了一项定性研究,以了解Android开发人员将Java代码迁移到Kotlin的原因,并将他们在此过程中的经验汇总在一起,以确定他们面临的主要困难。为了执行这项研究,我们首先确定了来自开源Android项目的提交,这些项目已经将Java代码迁移到Kotlin。然后,我们给编写这些迁移的开发人员发了电子邮件。因此,我们从98名将代码从Java迁移到Kotlin的开发人员那里获得了信息。本文介绍了研究确定的进行迁移的主要原因。我们发现开发人员将Java代码迁移到Kotlin是为了访问程序设计语言功能(例如,扩展函数,扩展函数,智能转换),这些功能在Java for Android开发中不可用,并获得更安全的代码(即,避免空指针异常)。我们还确定了研究…
CODEMENV: Benchmarking Large Language Models on Code Migration
Provable Responsible AI and Data Analytics (PRADA) Lab(可证明责任人工智能与数据分析实验室);King Abdullah University of Science and Technology(国王 Abdullah 科学与技术大学);Peking University(北京大学);South China University of Technology(华南理工大学)