Imagine you’ve spent the last decade building a sprawling, complex Android application. Now, the business wants it on iOS. Or maybe you’re staring at a mountain of legacy COBOL that needs to become modern Java. In the old days, this was a multi-year, soul-crushing manual labor project. Today, we have Large Language Models (LLMs).
But here’s the catch: while an LLM can translate a single function from Python to Rust with the grace of a poet, asking it to migrate an entire repository is like asking a translator to not just translate a book, but also redesign the printing press it runs on. This paper, a comprehensive survey of 96 sources, explores the chasm between "translating a snippet" and "migrating a system."
TL;DR
LLMs are surprisingly good at rewriting individual code modules, but they often stumble when tasked with the "repository-level" integration required to deliver a fully functional, deployable application. This survey maps out the current state of LLM-assisted migration, revealing that while we’ve mastered the "Editor" role, we are still struggling to build "Orchestrators" that can handle the complex web of dependencies and platform-specific quirks that define real-world software.
What Problem Does This Paper Address?
Software migration isn't just about changing syntax; it’s about changing the environment. When you move an app from Android to iOS, you aren't just switching Kotlin for Swift. You’re dealing with different UI lifecycles, permission models, and hardware abstractions.
The authors identify a major gap: most research focuses on module-level transformation (fixing a function or a file). However, real-world success requires repository-level integration. You can have 1,000 perfectly translated files, but if they don't talk to each other correctly or fail to compile because of a missing build configuration, you have zero working applications. The paper seeks to understand how LLMs are being used to bridge this gap and why "it compiles" is a dangerous proxy for "it works."
Methods
The authors analyzed 46 direct migration papers and 50 supporting studies through four distinct lenses:
- Software Engineering (SE) Perspective: Which part of the lifecycle is the LLM helping with? (Requirements, Design, Construction, or Testing).
- Role-Based Perspective: Is the LLM an Editor (writing the code) or an Orchestrator (running compilers, interpreting errors, and planning the next move)?
- Agent Perspective: How is the work coordinated? They contrast agentless pipelines (fixed scripts) with single-agent and multi-agent systems where models autonomously decide their next steps.
- Enabling Techniques: What "superpowers" are we giving the models? This includes RAG (Retrieval-Augmented Generation) for project context, environment feedback loops (using compiler errors to self-correct), and model adaptation (fine-tuning).
Datasets
The paper reviews a variety of benchmarks used to evaluate migration, categorized by their "granularity":
- Module-Level: JMigBench (Java upgrades), ArkTrans (UI components).
- Repository-Level: RepoTransBench (cross-language), MigrationBench (Java 8 to 17), FreshBrew.
- Deployed-App Level (The Gold Standard): ScarfBench and A2H-RepoBench. These are rare because they require the migrated code to actually run in a container or emulator to pass.
Key Insights and Ideas
- The "It Builds" Trap: Many studies claim success if the code simply compiles. However, the authors argue that compilation, visual similarity, and runtime behavior are fundamentally different properties. A UI that looks right but crashes when you rotate the screen is still a failure.
- Requirements are the "Forgotten Child": Most migration tools treat the old source code as the "truth." But legacy code is often full of "incidental" choices and old bugs. We lack systems that can extract the intent of a program before moving it to a new home.
- The Orchestration Paradox: We are seeing a surge in complex multi-agent architectures, but the authors found very little controlled evidence proving that a "team of agents" actually performs better than a well-written deterministic script for migration tasks.
- The Horseshoe Model: Migration often requires "climbing" up from code to architecture and then back down to the new target. LLMs are great at the bottom of the curve (code-to-code) but struggle with the high-level architectural shifts needed for platform migration.
Key Results
- Scale Matters: While LLMs are highly accepted for single-file migrations (~62%), that acceptance plummets to just 4.9% for entire projects.
- Success Rates: On the RepoTransBench (a repository-level benchmark), even the best configurations only succeed about 32.8% of the time.
- Industrial Impact: At Google, a year-long program showed LLMs could generate 74.45% of submitted migration changes, effectively halving the time required for large-scale updates.
Limitations and Future Work
The authors highlight several "open problems" that the community needs to tackle:
- Non-Functional Properties: We aren't just migrating logic; we care about memory safety, latency, and energy use. Current benchmarks almost entirely ignore these.
- Platform Gaps: How do we systematically handle a feature that exists on Android but has no direct equivalent on iOS?
- Cost and Maintenance: We don't know the "true cost" of LLM migration. If the generated code is a "spaghetti" mess that's impossible to maintain, the initial speed gain is a debt that will eventually come due.
- Independent Verification: We need benchmarks that evaluate the final product on the target platform, independent of the internal feedback loops used during construction.
Summary updated