The upgrades nobody can skip and nobody wants to do
Aerial view of Google’s Mountain View campus, where engineering teams manage one of the world’s largest shared codebases.
Photo: Austin McKinley (CC BY 3.0), via Wikimedia Commons.
Deep in Google’s Ads code, some IDs were stored as 32-bit numbers. They needed to become 64-bit numbers before they ran out of room. The Ads codebase alone holds more than 500 million lines of code, and those IDs were used in tens of thousands of places across thousands of files. By hand, it was expected to take hundreds of engineering years.[1] Every large codebase faces chores like this: an old testing library retired, a date-and-time library replaced, a number outgrowing the space it was given.
| Migration | What has to change | Why it is hard by hand |
|---|---|---|
| Ads ID widening | 32-bit ID numbers become 64-bit so they never run out of room | Tens of thousands of code locations across thousands of files |
| Test-framework upgrade | Older JUnit 3 tests are rewritten in the JUnit 4 style | Thousands of test files, each needing careful, identical edits |
| Date-and-time library swap | The Joda-Time library is replaced with Java’s built-in time library | Small differences in behavior must be preserved in every file |
AI was already writing a good share of Google’s code. In October 2024, chief executive Sundar Pichai said that more than a quarter of all new code at Google was generated by AI, then reviewed and accepted by engineers.[2]
An assembly line where engineers sign off on every change
Google’s migration pipeline splits the work three ways: proven tools, an AI model and engineers. Code-search tools find what must change. An AI model trained on Google’s own code drafts the edits. Automated builds and tests check them. Then engineers who own that part of the codebase review every change before it lands.[3]
-
Find every place that must change Code search
Engineers seed the search with a few known starting points. Google’s code-search and cross-reference tools trace every file that uses them. In the Ads migration, the model predicted which Java files needed editing with 91% accuracy.
-
Let the AI draft the edit AI model
The AI gets one narrow job: write the code change for each location. Its edits follow the patterns of Google’s own codebase, so the change reads like something an engineer on that team would write.[1]
-
Build and test automatically Validation
Every changed file gets built, and its unit tests run. Only passing changes move on, so reviewers spend their time on edits that already work.
-
Engineers review and submit Human sign-off
Engineers review AI-written code exactly as they review any other code. They add any missing tests and submit.
Before calling any migration a success, Google set the bar: AI had to save at least half of the end-to-end time.[1] On the first large migration, more than 75% of the AI-generated character changes landed in Google’s shared codebase.[3]
Months instead of engineering years
The engineers who did the Ads ID migration put their time saving at about 50%. 80% of the code changes that landed were written entirely by AI. Google reported both figures in a peer-reviewed paper at ICSE 2025, the field’s leading software engineering conference.[1]
On the test-framework migration, engineers committed approximately 87% of the AI-generated code edits exactly as written.
JUnit 3 to JUnit 4 migration · ICSE 2025 paperIn a follow-up study accepted at FSE 2025, three developers ran 39 migrations over 12 months. They submitted 595 code changes (74.45% generated by AI) containing 93,574 individual edits (69.46% generated by AI). Their estimate: roughly 50% less total migration time.[4] That matches the halving Google reported the first time around, as covered by The Register.[5]
From one migration to how Google writes code
By April 2026 the share had climbed to 75%. That’s how much of all new code at Google was AI-generated and approved by engineers, Pichai said, up from 50% the previous autumn. One particularly complex code migration, done by specialized AI software assistants (AI agents) and engineers working together, was completed six times faster.[6]
AI adoption among software development professionals reached 90% in Google’s 2025 DORA research program, which studies software delivery across the industry. More than 80% of respondents said AI had made them more productive.[7]
Developers given an AI coding assistant completed 26.08% more tasks in three randomized field experiments covering 4,867 developers at large companies.[8]
Airbnb moved nearly 3,500 test files to a newer testing library in six weeks. The estimate had been 1.5 years.[9] Amazon reported saving the equivalent of 4,500 developer-years by upgrading its Java systems with AI.[10] Both hand large, repetitive code migrations to AI, with engineers reviewing the results.
What peer teams can copy
Five moves for engineering leaders planning AI-assisted code migrations.
Phase 1 · Set Up the Migration
-
Start with the migration everyone keeps postponing
IT & EngineeringPick a well-defined, repetitive upgrade, like a retired test library or a widened ID. The correct change should be clear. The sheer volume is what makes it painful.
-
Use proven search tools to find the work
IT & EngineeringLet code search and cross-references find every affected file. Give the AI one narrow job: draft the edit for each location.
-
Define success before you start
OperationsGoogle’s bar was AI saving at least half the end-to-end time. Write your own target down, and measure it with the engineers doing the work.
Phase 2 · Ship It Safely
-
Build and test before a person looks
OperationsBuild and unit-test every AI-drafted change automatically. Reviewers should only ever see edits that already compile and pass.
-
Keep normal code review for every change
IT & EngineeringSend AI-written changes to the engineers who own that code, and hold them to the same review standard as any other change. Track how much lands untouched.
Footnotes & Sources
- Nikolov et al. — “How is Google using AI for internal code migrations?”, ICSE-SEIP 2025 (doi:10.1109/ICSE-SEIP66354.2025.00048)
- Google — Alphabet Q3 2024 earnings call: CEO’s remarks (October 2024)
- Google Research — Accelerating code migrations with AI (July 2024)
- Ziftci et al. — “Migrating Code At Scale With LLMs At Google,” FSE 2025
- The Register — Google reports halving code migration time with AI help (January 2025)
- Google — Cloud Next ’26: Sundar Pichai on AI-generated code and agent-assisted migrations (April 2026)
- Google — How are developers using AI? Inside our 2025 DORA report (September 2025)
- Cui, Demirer, Jaffe, Musolff, Peng & Salz — The Effects of Generative AI on High-Skilled Work: Evidence from Three Field Experiments with Software Developers (2025)
- Airbnb Tech Blog — Accelerating Large-Scale Test Migration with LLMs (2025)
- Andy Jassy, Amazon — Java upgrades with Amazon Q Developer and 4,500 developer-years saved (August 2024)