arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.04852cs.SEcs.AI
收藏

FreshBrew:一个用于评估AI智能体进行Java代码迁移的基准

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

AI总结:

本文提出了FreshBrew基准,用于评估AI智能体在项目级Java代码迁移中的表现,发现最优模型Gemini 2.5 Flash能成功迁移52.3%的项目,并揭示了当前智能体方法的优势与局限。

摘要:

AI编码助手正迅速成为现代软件开发不可或缺的组成部分。该领域的一个关键挑战是,为了应对不断演进的软件生态系统,需要持续地迁移和现代化代码库。传统上,此类迁移依赖于基于规则的系统和人工干预。随着强大的大型语言模型(LLMs)的出现,AI驱动的智能体框架提供了一个有前景的替代方案,但其有效性尚未得到系统性评估。在本文中,我们引入了FreshBrew,一个用于评估AI智能体在项目级Java迁移上的新基准,特别侧重于衡量智能体保留程序语义和避免奖励作弊的能力,我们认为这需要具有高测试覆盖率的项目才能进行严格可靠的评估。我们对几个最先进的LLM进行了基准测试,并将它们的性能与成熟的基于规则的工具进行了比较。我们对AI智能体在这个包含228个仓库的基准上的评估表明,表现最好的模型Gemini 2.5 Flash能够成功将52.3%的项目迁移到JDK 17。我们的实证分析揭示了对当前智能体方法的关键优势和局限性的新见解,为其在现实世界中的适用性提供了可操作的见解。我们的实证研究揭示了当前AI智能体在现实Java现代化任务中的失败模式,为评估可信赖的代码迁移系统奠定了基础。通过发布FreshBrew,我们旨在促进严格、可复现的评估,并催化AI驱动的代码库现代化的进展。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑