REALWINS.AI
Suggest a Win
Resources / Technology
GOOGLE · INTERNAL ENGINEERING

Google Engineers Migrate 5,359 Test Files in Three Months With AI—and Keep 87% of Its Code Unchanged

Inside Google, AI drafts the edits for big, tedious code migrations, and engineers review every change before it lands. A peer-reviewed ICSE 2025 paper reports 5,359 files moved in three months and about half the time saved on a major Ads migration.

AT-A-GLANCE IMPACT

AI-written test code committed unchanged
A ring filled to 87 percent shows the share of AI-generated code that engineers committed without any change. 87%
Test-framework migration · ICSE 2025 paper
Test files migrated in three months
A stack of code files moves along an arrow from an old format to a new one. 5,359
149,000+ lines of code changed · Test-framework migration
Ads code changes written by AI
Proportional bar: of every 100 code changes landed in the Ads ID migration, 80 were fully written by AI. All landed changes100 Fully AI-written80 80%
Ads 32-to-64-bit ID migration
Migration time saved
A clock face with half its dial shaded shows an estimated 50 percent cut in total migration time. ~50%
Ads ID migration · Estimated by the engineers doing it
01 · The Challenge

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.

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]

02 · How the AI Works

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]

A stack of old-format code files moves along an amber arrow to become new-format files.
Old code in, reviewed new code out
  1. 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.

  2. 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]

  3. 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.

  4. 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]

03 · Measured Results

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]

A ring filled to 87 percent shows how much of the AI’s test-migration code engineers committed exactly as written.

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 paper
5,359 Test files migrated to the newer framework
149,000+ Lines of code changed
3 months From start to finish

In 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]

04 · Broader Strategy

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]

90%Developers using AI at work

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.

05 · Playbook

What peer teams can copy

Five moves for engineering leaders planning AI-assisted code migrations.

Phase 1 · Set Up the Migration

  1. Start with the migration everyone keeps postponing

    IT & Engineering

    Pick 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.

  2. Use proven search tools to find the work

    IT & Engineering

    Let code search and cross-references find every affected file. Give the AI one narrow job: draft the edit for each location.

  3. Define success before you start

    Operations

    Google’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

  1. Build and test before a person looks

    Operations

    Build and unit-test every AI-drafted change automatically. Reviewers should only ever see edits that already compile and pass.

  2. Keep normal code review for every change

    IT & Engineering

    Send 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

  1. Nikolov et al. — “How is Google using AI for internal code migrations?”, ICSE-SEIP 2025 (doi:10.1109/ICSE-SEIP66354.2025.00048)
  2. Google — Alphabet Q3 2024 earnings call: CEO’s remarks (October 2024)
  3. Google Research — Accelerating code migrations with AI (July 2024)
  4. Ziftci et al. — “Migrating Code At Scale With LLMs At Google,” FSE 2025
  5. The Register — Google reports halving code migration time with AI help (January 2025)
  6. Google — Cloud Next ’26: Sundar Pichai on AI-generated code and agent-assisted migrations (April 2026)
  7. Google — How are developers using AI? Inside our 2025 DORA report (September 2025)
  8. Cui, Demirer, Jaffe, Musolff, Peng & Salz — The Effects of Generative AI on High-Skilled Work: Evidence from Three Field Experiments with Software Developers (2025)
  9. Airbnb Tech Blog — Accelerating Large-Scale Test Migration with LLMs (2025)
  10. Andy Jassy, Amazon — Java upgrades with Amazon Q Developer and 4,500 developer-years saved (August 2024)

What the evidence labels mean

VERIFIED IMPACT

A live workflow with a measured outcome. We identify the baseline, timeframe and original data producer, and look for independent corroboration.

LIVE IN PRODUCTION

A named organization runs the workflow today and an operator describes what changed. Organization-reported outcomes without independent verification stay here.