Google uses LLMs for internal code migrations and reports about 50% less migration time
Google engineers published papers on using LLMs to run large internal code migrations, such as JUnit3 to JUnit4 and int32 to int64 IDs. Most of the landed code changes were generated by the model.
- Organization
- Industry
- Technology
- When
- Jan 2025
- Evidence
- Research paper
- Agents and tools
- Gemini (internal)
Reported outcome
Across 39 migrations, about 74% of code changes were LLM-generated; developers estimated a 50% cut in total migration time.
- 39Migrations studied
- ~74%LLM-generated changes
- ~50% (dev estimate)Time saved
Caveats
Described in a paper with a stated method. Peer review status varies.
- Time savings are developer estimates, not a controlled experiment.
- Results differ a lot between migrations.
What the agent does
A pipeline finds the code that needs changing, asks the model to make the change, then runs builds and tests. Engineers review and land the changes. For one JUnit3-to-JUnit4 migration, reports say 5,359 files moved in three months, and about 87% of the AI code was committed unchanged.
What to copy
- Use classic tools (search, static analysis) to find the targets. Use the LLM to make the edit.
- Keep the change small per file, so review is fast.
- Measure the share of model edits that land unchanged. It is a good quality signal.
Starter prompt
Written by us.
Change every use of {old_type} for {field_name} to {new_type} in this file.
Also update:
- function signatures that pass this field
- tests that build this field
Do not change anything else. If a change would affect an external API,
leave a TODO comment instead.
File:
{file_contents}
Sources
- Migrating Code At Scale With LLMs At Google (FSE 2025) — FSE 2025, 2025
- Google reports halving code migration time with AI help — The Register, Jan 2025
Added Oct 16, 2026. Spotted an error? Send a correction.
Get new use cases weekly
One short email. Sources included.
Related use cases
Spotify's Honk background agent merges fleet-wide code migrations: 1,500+ PRs and counting
1,500+ merged AI-generated PRs; 1,000 merged PRs took three months at first and about ten days later on.
Airbnb migrated 3,500 test files with an LLM pipeline in 6 weeks instead of 1.5 years
~3,500 test files migrated in 6 weeks; about 97% fully automated and the rest finished by hand.
Amazon upgraded 30,000 internal apps to Java 17 with Amazon Q Developer
30,000 apps upgraded. Amazon estimates 4,500 developer-years saved and $260M a year from performance gains.