MigrationBench: Repository-Level Code Migration Benchmark from Java 8
This paper introduces MigrationBench, a comprehensive repository-level benchmark and evaluation framework for migrating Java 8 code to modern LTS versions (17 and 21), demonstrating that an agentic LLM framework can achieve high success rates on this challenging task.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a massive, old library filled with books written in a specific, slightly outdated style of English (let's call it "English 8"). The library is huge, containing thousands of books, and every single one of them is currently in perfect condition.
Now, imagine the library board decides to upgrade the entire building to a new, modern standard ("English 17"). This isn't just about changing the font; it's about updating the grammar rules, the vocabulary, and the way the books are organized so they work with the new building's security systems and elevators.
MigrationBench is a giant challenge created by researchers at AWS AI to test how well Artificial Intelligence (specifically, Large Language Models or LLMs) can handle this massive renovation project.
Here is the breakdown of their work using simple analogies:
1. The Problem: Moving a Whole City, Not Just a House
Most previous AI tests were like asking a robot to fix a single leaky faucet or write a single paragraph. But real-world software isn't just one file; it's a whole city of interconnected buildings (a "repository").
- The Challenge: Moving from "English 8" to "English 17" requires changing thousands of files at once. If you change one street sign, you might break the traffic lights three blocks away.
- The Gap: Until now, there was no standardized "exam" to see if AI could handle renovating an entire city of code without crashing the whole system.
2. The Solution: The "MigrationBench" Dataset
The researchers built a massive test suite called MigrationBench.
- The Full Dataset: They gathered 5,102 real, open-source Java projects from the internet (like GitHub). They filtered them to ensure they were high-quality, had proper licenses, and were currently working perfectly.
- The "Selected" Subset: Testing all 5,000+ projects takes forever. So, they hand-picked 300 of the most complex, tricky, and interesting projects. Think of this as the "Final Exam" version of the dataset, designed to really stress-test the AI.
3. The Rules of the Game (Evaluation)
How do you know if the renovation was successful? The researchers set up two levels of difficulty:
Level 1: Minimal Migration (The "It Works" Test)
- Goal: The AI just needs to make sure the code compiles (builds) and all the existing tests pass in the new version.
- Analogy: The building is safe, the lights turn on, and the elevators work. The books are readable.
- Success Rate: With their best AI setup, they achieved a 71.67% success rate here.
Level 2: Maximal Migration (The "Modernization" Test)
- Goal: The AI must not only make it work but also upgrade every single tool and library inside the code to their absolute latest, most secure versions.
- Analogy: Not only is the building safe, but the AI also replaced all the old plumbing with new copper pipes, updated the security cameras to 4K, and installed the latest smart-home features. This is much harder because new tools often have different rules.
- Success Rate: This is much tougher. The best AI setup achieved a 53.33% success rate.
4. The Workers: AI Agents
The researchers didn't just ask the AI to "write code." They built AI Agents—digital workers equipped with tools.
- The Basic Worker: A simple AI that looks at the code and tries to fix errors. It struggled with the "Maximal" upgrade.
- The Smart Worker (Prompt Engineering): They gave the basic worker a better set of instructions, telling it specifically to upgrade everything. This helped a lot.
- The Researcher Worker (RAG): They gave the worker a "phone book" (a knowledge base) of the latest software versions so it didn't have to guess. This improved the results further.
- The Hybrid Team (The Winner): This was the cleverest approach. They used a computer program to automatically swap out the old tools for new ones (a fast, robotic step) and then let the AI Agent come in to fix the messy parts where the new tools didn't fit perfectly.
- Result: This team did just as well as the most expensive AI worker but used 11% less computing power.
5. The Results
The paper shows that while AI is getting very good at fixing small code problems, renovating an entire software "city" from an old version to a new one is still a massive challenge.
- The Hybrid approach (combining automated tools with AI) proved to be the most efficient way to do it.
- The dataset and the code for these AI agents are now public, so other researchers can try to build even better renovation teams.
In short: MigrationBench is a new, rigorous gym for AI to practice moving entire software libraries from old versions to new ones. It shows that while AI is capable, the most complex "renovations" still require a smart mix of automated tools and human-like reasoning to get the job done right.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.