paperbot · PL 论文追踪

全部论文 待读 收藏

P1 FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration

FreshBrew:评估 AI Agent 进行 Java 代码迁移的基准
ICSE Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering2026匹配度 6/10 · 该论文提出面向项目级 Java 代码迁移的 AI agent 基准,并关注语义保持与 reward hacking,属于 Agentic coding agent 的评估研究,与画像中“Agentic 程序”和“重要场景下的 benchmark”兴趣相关。但核心是代码迁移而非静态分析/形式化验证,也未涉及浮点或贝叶斯程序分析,因此匹配度为中等。引用 9 inbox
Victor May, Diganta Misra, Yanqi Luo, Anjali Sridhar, Justine Gehring, Silvio Soares Ribeiro
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出 FreshBrew 基准,系统评估 AI agent 在项目级 Java 迁移中保持语义、避免 reward hacking 的能力。

随着软件生态持续演进,代码库需要不断迁移与现代化,传统做法依赖规则系统与人工介入。LLM 驱动的 agent 框架被视为有潜力的替代方案,但其有效性尚未得到系统评估。本文提出 FreshBrew——一个面向项目级 Java 迁移的 AI agent 基准,重点衡量 agent 保持程序语义、避免 reward hacking 的能力,并因此主张评测应建立在高测试覆盖率的项目之上。该基准包含 228 个代码仓库,作者在其中对比了多种前沿 LLM 与既有规则工具的表现。结果显示,表现最好的模型 Gemini 2.5 Flash 能将 52.3% 的项目成功迁移到 JDK 17。实证分析进一步揭示了当前 agentic 方法的优势、局限以及在真实 Java 现代化任务中出现的典型失败模式,为构建可信的代码迁移系统提供了基础。

问题
代码库需随生态演进持续迁移现代化,AI agent 方案虽有潜力,但此前缺乏系统评估,尤其缺少对语义保持与 reward hacking 的严格衡量。
方法
构建 FreshBrew 基准,选取 228 个高测试覆盖率的 Java 仓库,以项目级迁移到 JDK 17 为任务,用测试结果作为语义保持的判据,并对多个 SOTA LLM 与规则工具进行对比评测。
评估
在该 228 仓库基准上测试多种 LLM agent 并与规则工具对比,最佳模型 Gemini 2.5 Flash 成功迁移 52.3% 的项目;作者还通过实证分析归纳出典型失败模式。
原文摘要(Abstract)

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 FreshBrew1, 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 of AI agents on this benchmark of 228 repositories 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 strengths and limitations of current agentic approaches, including characteristic failure modes observed 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.

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2510-04852,
  title = {FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration},
  author = {Victor May and Diganta Misra and Yanqi Luo and Anjali Sridhar and Justine Gehring and Silvio Soares Ribeiro},
  booktitle = {ICSE},
  year = {2026},
  doi = {10.1145/3744916.3773214}
}