LLM-Assisted Software Migration: from Module-Level Transformation to Repository-Level Integration
Organizations: Huawei Technologies Co., Ltd. · University of Groningen.
Abstract
Software migration adapts an existing implementation to a new language, version, API, framework, or platform while preserving its behavior. Large language models (LLMs) succeed on individual functions and modules, but this success does not readily carry over to entire repositories, particularly deployable applications. This survey reviews LLM-assisted migration from module-level transformation to repository-level integration, culminating in the delivery of complete applications. We analyze 96 sources---including 46 direct migration papers---across four perspectives: (1) supported software engineering activities, (2) model roles as editors or orchestrators, (3) orchestration workflows (agentless, single-agent, or multi-agent), and (4) enabling techniques including knowledge engineering, project context, environment feedback, and model adaptation. We then compare evaluation practices and benchmarks. Although 30 of the 46 studies target repositories, most acceptance evidence relies merely on build success, supplied tests, or static and model-based proxies. Moreover, compilation, visual similarity, test outcomes, and runtime behavior capture fundamentally distinct properties and cannot be conflated into a single success rate. We also identify critical gaps in requirements engineering support and in controlled comparisons of agent architectures. Finally, we discuss six open problems: application integration, platform differences, non-functional properties, generalization, attribution of gains, as well as cost and maintenance.
Figures & tables
| Type | Typical changes | Representative studies |
|---|---|---|
| Cross-language | Syntax, types, memory model, standard library, idioms | Repository-level translation [ 15 , 16 ] ; C-to-Rust project migration [ 2 ] |
| Version and API | Deprecated APIs, breaking dependency updates, language or SDK versions | Java version upgrades [ 3 ] ; Android deprecated API updates [ 4 ] ; breaking dependency updates [ 5 ] |
| Framework | Component, state, and plugin abstractions; build system | Enterprise Java framework migration [ 17 ] ; Android XML-to-Compose UI conversion [ 29 ] |
| Platform | Language, UI framework, runtime calls, resources, permissions, configuration | Android-to-HarmonyOS repository migration [ 6 ] ; Android-to-iOS translation [ 7 ] ; UI translation to ArkUI [ 12 ] |
| Test assets | Actions, locators, and assertions of existing tests | GUI test transfer [ 30 ] ; Android-to-OpenHarmony test migration [ 18 ] |
| Level | Additional requirements | Typical acceptance evidence |
|---|---|---|
| Module | Correct translation of the selected unit | Compilation, unit tests, similarity metrics |
| Repository | Dependency ordering, interface consistency, coordinated edits to code, tests, and build files | Project build, test suites, coverage |
| + deployed | As a running application: resources, configuration, platform services, user-visible behavior | Deployment, GUI-level tests, behavioral checks |
| Class | Criterion |
|---|---|
| A: direct migration | Uses an LLM to migrate implementation code, or evaluates LLMs or LLM-based agents on an explicit migration task, at the module or repository level. |
| B: adjacent support | Rule-based and historical migration methods kept for comparison; studies of testing, repair, context recovery, or GUI operation with mechanisms or evaluation protocols applicable to migration; not counted as implementation migration. |
| C: background | Terminology, prior surveys, review methodology, and foundational code models; not counted as evaluated migration methods. |
| Excluded | Transfer of user data without implementation changes; translation tasks unrelated to code; full text unavailable. |
| Class and group | Count | Records |
| A: LLM-assisted direct migration | 46 | |
| Module | 16 | [ 1 , 4 , 10 , 11 , 12 , 39 , 40 , 31 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 32 ] |
| Repository | 30 | [ 2 , 3 , 5 , 6 , 7 , 8 , 13 , 15 , 16 , 17 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 ] |
| of which require a deployed application | 4 | [ 6 , 7 , 17 , 60 ] |
| of which mobile | 5 | [ 4 , 6 , 7 , 11 , 12 ] |
| B: adjacent and comparison work | 30 |
| Primary type | Module | Repository | Total |
|---|---|---|---|
| Cross-language | 8 | 15 | 23 |
| Version and API | 6 | 11 | 17 |
| Framework | 0 | 1 | 1 |
| Platform | 2 | 3 | 5 |
| Total | 16 | 30 | 46 |
| Share | 34.8% | 65.2% |
| Study | Deployment performed | Runtime probes | Independent behavioral acceptance |
|---|---|---|---|
| ScarfBench [ 17 ] | Yes (container) | NR | Yes |
| Mono2Sls [ 60 ] | Yes (cloud) | NR | Yes, after the workflow |
| ECAT [ 6 ] | Yes (emulator) | Yes | No (model-judged) |
| Pilot study [ 7 ] | No | No | No |
| RQ | Perspective | Categories | Extracted information |
|---|---|---|---|
| RQ1 | Task landscape (§ III-C ) | Migration type; module, repository | Source and target languages, frameworks, platforms, and versions; inputs and outputs; granularity |
| RQ2 | SE (§ IV ) | Specification, design, construction, testing | Specification recovery; decomposition and mapping; generation and generate–check–repair loops; acceptance checks; human participation |
| RQ3 | Role (§ V ) | Writing target code; operating tools around code | Model and version; artifacts the model produces; tools it invokes; division of work with deterministic components |
| RQ3 | Orchestration (§ VI ) | Agentless, single-agent, multi-agent | Who chooses the next step; stopping rule and retry budget; agent topology |
| RQ4 | Technique (§ VII ) | Knowledge engineering, project context engineering, environment and feedback engineering, model adaptation | Migration knowledge and mappings; retrieved project context; environment and feedback signals; fine-tuning data and objectives |
| RQ5 | Evaluation (§ VIII ) | Property checked, scope, means, judge | Benchmark; sample unit and denominator; metrics and oracle; baselines; cost |
| Study | Cat. | Requirements engineering | Software design | Software construction | Testing |
|---|---|---|---|---|---|
| ArkTrans [ 11 ] | C | Extracted UI representation | Component mapping; partial skeleton | Skeleton completion; pattern-based post-fixing | NR |
| TyMCRaT [ 54 ] | D | NR | Call-graph order; candidate signatures | Body translation; type repair from compiler feedback | Compiler feedback |
| GUPPY [ 4 ] | C | NR | NR | Updated API usages; test-driven refinement | Generated tests |
| Android-to-OpenHarmony test study [ 18 ] | T | Source test intent | NR | NR | Migrated GUI tests on existing apps |
| AlphaTrans [ 15 ] | Dev | Source code and tests | Skeleton; reverse call order | Fragment translation; recomposition | Source and translated tests |
| ReCodeAgent [ 16 ] | Dev | NR | Planner | Code translation; validator feedback | Translated and coverage-guided tests |
| Structure and subtype | Who chooses the next step | Model role | Systems | Evidence about the structure |
| Agentless workflows (9 systems) | ||||
| Algorithm-driven call sequence | Program (path search) | E | INTERTRANS [ 44 ] | NR |
| Algorithm-driven refinement search | Program (MCTS selection and stopping) | E | LAC2R [ 67 ] | NR |
| Analysis-guided pipeline | Program (static analysis or computed plan) | E | RustMap [ 2 ] , AlphaTrans [ 15 ] , C2SaferRust [ 61 ] , Google [ 8 ] , CodePlan [ 48 ] | CodePlan compares against baselines without planning; the others NR |
| Scripted repair loop | Program (fixed retry and stopping rule) | E | LLMigrate [ 42 ] , Byam [ 5 ] | NR |
| Single-agent systems (3 systems, plus coding agents evaluated on benchmarks) | ||||
| Property | Establishes | Does not establish | Usual means | Example use |
|---|---|---|---|---|
| Similarity to a reference or the source | The output resembles a reference migration or the source in tokens or structure | That the code compiles, or behaves correctly | Static | CodeBLEU; structural alignment |
| Build validity | The code compiles, types check, and dependencies resolve | That the program launches or behaves correctly | Static | File or project compilation |
| Idiomaticity or safety | The output follows target-language practice on a proxy measure | That the code is correct, or maintainable in general | Static | Share of unsafe Rust code |
| Visual correspondence | The target UI resembles the source in appearance | That interactions, navigation, or state behave correctly | Static or dynamic | Page-level visual similarity |
| Functional behavior | The exercised cases produce the expected results, within the scope checked | Behavior outside the exercised cases; the adequacy of the tests | Dynamic | Unit and repository test suites; behavioral tests on a deployed application |
| Metric | Definition | Property | Means | Judge | Representative studies |
|---|---|---|---|---|---|
| Exact match, BLEU, CodeBLEU | Lexical or structural similarity to a reference migration | Similarity | Static | Rule | [ 40 , 70 ] |
| Structural alignment | Correspondence between source and target program elements | Similarity | Static | Rule | [ 6 ] |
| Compilation success | Fraction of files or projects that compile on the target | Build validity | Static | Rule | [ 11 ] |
| Unsafe-code share | Share of unsafe code in translated Rust, as a proxy for idiomatic use of the target language | Idiomaticity or safety | Static | Rule | [ 61 , 9 ] |
| Visual similarity | Similarity between source and target UI renderings | Visual correspondence | Dynamic | Rule | [ 11 ] |
| Test pass rate, computational accuracy | Fraction of tasks or units whose tests pass on the target | Functional behavior | Dynamic | Rule | [ 70 , 13 , 15 , 16 , 49 ] |
| Level | Resource | Migration task | Scale | Acceptance criteria | Property; means; judge |
| Module | JMigBench [ 40 ] | Java 8 Java 11 function updates | Function-level tasks across deprecated-API categories | CodeBLEU, keyword checks, exact matches | Similarity; static; rule |
| ArkTrans dataset [ 11 ] | Compose or SwiftUI ArkUI pages | 100 parallel pages; 75 evaluation files per direction | File compilation; global and local visual measures; external dependencies excluded | Build validity, visual; static compilation and dynamic rendering; rule | |
| Python 2 snippets [ 41 ] | Python 2 Python 3 modernization | 60 snippets | Behavior checked by a type-strict oracle | Behavior; dynamic; rule | |
| Repository | RepoTransBench [ 13 ] | Cross-language repository translation | 1,897 repositories; 13 language pairs | Executable test suites | Behavior; dynamic; rule |
| MigrationBench [ 3 ] | Java 8 Java 17 in the reported experiments (21 also supported) | 5,102 repositories in the full set; 300 in the selected subset | Build and tests, target bytecode version, preserved test-class/method name lists, and a non-decreasing executed test count. The maximal tier additionally enforces dependency-version requirements. | Build validity, behavior; dynamic; rule | |
| FreshBrew [ 50 ] | Java JDK 17 | 228 Maven repositories | Build, original tests still passing, coverage drop within five points | Build validity, behavior; dynamic; rule |
| Problem | Open question | Suggested study |
|---|---|---|
| Integration (§ IX-A ) | Do explicit cross-module contracts improve application-level outcomes, and do module-level scores predict them? | Same application pairs evaluated with and without contracts; fixed generator, inputs, and budget; outcomes measured via complete user journeys |
| Platform differences (§ IX-B ) | Can intent-level specifications accept valid platform adaptations without inadvertently accepting lost functionality? | Acceptable variations strictly annotated in advance; comparison of intent-level versus literal correspondence; tracking rates of false acceptance and false rejection |
| Non-functional properties (§ IX-C ) | How often do functionally accepted migrations meet source-relative budgets, and can profiling-guided repair reduce regressions? | Repeated profiling on matched devices and workloads; latency, memory, energy, and security budgets reported alongside functional outcomes |
| Generalization (§ IX-D ) | Do performance gains persist on unseen applications, migration directions, and SDK versions? | Strict holdouts split by application family and version; comparison of current versus stale mapping knowledge; results stratified by hardware and external service dependencies |
| Attribution (§ IX-E ) | Does the orchestration structure or the assigned model role independently improve results? | Controlled studies varying one factor at a time; fixed generator, inputs, acceptance criteria, and total budget, with token-matched and time-matched designs reported separately |
| Cost and maintenance (§ IX-F ) | What is the true total cost of an accepted migration, and how expensive is the resulting code to maintain? | Budget sweeps accounting for failures and human labor; longitudinal comparisons against manual reimplementation |
Software Engineering
Software engineering studies how to design, build, test, deploy, and maintain reliable software systems and the processes behind them.
See all 299 papers