# How Google Uses AI to Speed Up Code Migrations by 50% | LinearB Blog

> Google used AI to automate 74% of a code migration and cut dev time by 50%. Learn how LLMs are transforming software maintenance and developer productivity

_This is a markdown rendering of a live HTML page on linearb.io, generated for AI/LLM consumption — it is not a markdown-only site. To get the full HTML page instead, request this URL with an explicit `Accept: text/html` header (no wildcard, no markdown preference)._

[Blog](https://linearb.io/blog)

/

How Google Uses AI to Speed Up Code Migrations by 50%

# How Google Uses AI to Speed Up Code Migrations by 50%

![Photo of Ben Lloyd Pearson](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/blp_headshot_1_ee25d527aa?_a=BAVMn6ID0)

By [Ben Lloyd Pearson](https://linearb.io/blog/how-google-uses-ai-to-speed-up-code-migrations#ben-lloyd-pearson)

|

April 23, 2025

![How_Google_Uses_AI_to_Speed_Up_Code_Migrations_by_50_f627b6e37a](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/How_Google_Uses_AI_to_Speed_Up_Code_Migrations_by_50_f627b6e37a?_a=BAVMn6ID0)

The software industry is constantly evolving and developers frequently need to update legacy code to maintain compatibility with new technologies. One such challenge is migrating code from one format to another: a process that has traditionally been tedious, time-consuming, and error-prone. However, recent advancements in AI, particularly Large Language Models (LLMs), are changing how these migrations are handled.

A recent whitepaper from Google offers fascinating insights into how the company is leveraging [LLMs to automate code migrations at scale](https://arxiv.org/pdf/2504.09691). 

To summarize: AI wrote nearly 75% of the code, and Google developers believe it increased productivity by 50%. Let's look at the key findings and implications of this groundbreaking work.

## **Leveraging AI for Routine System Migrations**

Google leveraged a relatively routine task for their experiment: transitioning identifiers from 32-bit to 64-bit integers. This functionally simple change requires modifications across potentially hundreds of files in multiple programming languages.

Traditional approaches to such migrations typically involve:

* Using regular expressions to find potential code references
* Manually inspecting and modifying each reference
* Manually testing changes to ensure correctness
* Managing the frustrating, time-consuming process of finding all instances requiring changes

When done manually, these migrations could take years to complete - as evidenced by a previous similar migration at Google that took approximately two years.

## **Google's Innovative Approach to Leveraging AI**

To address these challenges, Google developed an automated system that integrates LLMs into the migration workflow. The system follows a structured process:

1. **Find Potential References**: Using Google's code indexing system (Kythe), the tool identifies direct references to the identifiers being migrated, as well as indirect references up to a distance of five.
2. **Categorize References**: The system classifies identified references into groups based on confidence levels:
  * Not-migrated: Locations identified with 100% confidence as not yet migrated
  * Irrelevant: Locations determined to be irrelevant with 100% confidence
  * Relevant: Locations that need further investigation
  * Left-over: Locations intentionally set aside for manual developer review to determine if migration is required or to mark explicitly as irrelevant.
3. **Change & Validate**: This is where the LLM comes into play. The system uses[ Google's Gemini](https://gemini.google.com/) model (fine-tuned on internal Google code) to suggest appropriate code changes, which are then validated through multiple steps to ensure correctness.

![Flowchart of an automated ID migration system showing the process of identifying, categorizing, modifying, and validating code references using Kythe, developers, and LLMs. The system handles both automatic and manual code changes, with final approvals from code owners. The loop repeats until no ID references remain](https://assets.linearb.io/image/upload/v1745366736/How_Google_Uses_Ai_to_Support_Code_Migration_Image_1_72c4491201.png)

The validation process is particularly thorough, including checks for successful completion, whitespace-only changes, AST parsing, a "punt" check where the LLM itself determines if the change was necessary, and build/test validations.

## **How AI Handled Most of the Migration Workload**

The results of this approach are remarkable. Over twelve months, three developers used the system to perform 39 distinct migrations, resulting in:

* 595 total code changes submitted
* 93,574 total edits across all changes
* 74.45% of code changes were generated by the LLM
* 69.46% of edits performed by the LLM
* An estimated 50% reduction in developer time compared to manual approaches

![Bar chart comparing LLM-generated versus human-made code changes across 39 IDs. Each ID shows two bars representing the percentage of contributions from LLMs (green) and human developers (yellow), illustrating varying levels of automation success per identifier.](https://assets.linearb.io/image/upload/v1745366736/How_Google_Uses_Ai_to_Support_Code_Migration_Image_2_png_4c2e4f6ec1.png)

The developers reported high satisfaction with the automated system, particularly appreciating how AI helped with continuous progress, system accuracy, and reducing tedious work.

## Google’s Strategic AI Rollout is Key to Their Success

Despite its success, the system wasn't without challenges. They reported the following issues:

* **LLM Context Window Limitations**: Large files sometimes couldn't fit entirely within the LLM's context window, requiring manual intervention. Although newer versions of Gemini now have a much larger context window that may mitigate this issue.
* **LLM Hallucinations**: The model occasionally produced irrelevant changes, unnecessary comments, or simply reformatted code without making meaningful changes.
* **Language Support Variances**: The LLM performed well with languages like Java, C++, and Python, but struggled with less common languages like Dart.
* **Pre-existing Issues**: Test failures unrelated to the migration sometimes hindered the automated process.

You should always expect your AI initiatives to encounter uncertainties like these and ensure developers are looped in at the right steps to mitigate risk and catch errors.

Google's approach demonstrates a strategic deployment of AI that accelerates software maintenance while maintaining high quality standards. By focusing on routine but essential tasks like code migrations - the "low-hanging fruit" of software engineering - Google has created a structured initiative that delivers immediate value while minimizing risks.

This research shows how AI can transform engineering practices when deployed with careful planning and rigorous validation. The success metrics are compelling: with nearly 75% of code changes generated by AI and development time cut in half, Google has proven that targeted AI applications can dramatically [improve developer productivity](https://linearb.io/blog/developer-productivity) on routine tasks.

## How to Apply Google’s Research

This research demonstrates the significant potential of LLMs to transform software engineering practices. By automating substantial portions of repetitive migration tasks, they can free developers to focus on more creative and complex aspects of software development. The approach's success highlights the potential for similar applications in other code transformation tasks, from library migrations to framework updates, potentially saving thousands of developer hours across the industry.

For engineering leaders across the industry, this research offers a practical roadmap for [AI implementation](https://linearb.io/platform/ai-workflow-governance) \- start with well-defined, repetitive tasks that consume significant developer time but don't require deep creative thinking. As Google's experience demonstrates, this approach allows teams to build confidence in AI tools while simultaneously freeing skilled developers to focus on innovation and complex problem-solving.

As LLM capabilities continue to advance, particularly with larger context windows and reduced hallucinations, we can expect these benefits to become even more pronounced. Google's methodical approach to AI deployment for system migrations serves as a model for how organizations can effectively integrate these powerful tools into their engineering workflows.

For more info on how you adopt AI effectively for your engineering team, check out the blogs below:

* [Measuring Developer and Agent Productivity in an API-Driven World](https://linearb.io/blog/measuring-developer-and-agent-productivity-in-an-api-driven-world)
* [Specialized AI Models: The Future of AI-Assisted Coding](https://linearb.io/blog/specialized-ai-models)
* [How Agentic AI Will Disrupt Your Software Delivery Lifecycle](https://linearb.io/blog/how-agentic-ai-will-disrupt-your-software-delivery-lifecycle)

## Improve developer productivity with LinearB

Find us on

[](https://www.linkedin.com/company/linearb)
[](https://devinterrupted.substack.com/)

![blp_headshot_1_ee25d527aa](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/blp_headshot_1_ee25d527aa?_a=BAVMn6ID0)

## Ben Lloyd Pearson

Ben hosts Dev Interrupted, a podcast and newsletter for engineering leaders, and is Director of DevEx Strategy at LinearB. Ben has spent the last decade working in platform engineering and developer advocacy to help teams improve workflows, foster internal and external communities, and deliver better developer experiences.

### Connect with

[](https://www.linkedin.com/in/benlloydpearson)
[](https://substack.com/@benlloydpearson)

## Your next read

[![Cover image for Slack turns channels into the context engine for agentic AI](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/Blog_Post_Name_2400x1256_077524ba8b?_a=BAVMn6ID0)](https://linearb.io/blog/slack-jaime-delanghe-mcp-agent-context-channels)

Workflow

[Slack turns channels into the context engine for agentic AI](https://linearb.io/blog/slack-jaime-delanghe-mcp-agent-context-channels)

Slack Chief Product Officer Jaime DeLanghe breaks down how channels serve as the foundational context layer for human-agent collaboration. Learn why Slack is...

[![Cover image for Code generation is faster than ever, but shipping value isn't](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/Blog_AI_code_review_bottleneck_2400x1256_d73333ea46?_a=BAVMn6ID0)](https://linearb.io/blog/code-generation-faster-shipping-isnt)

Workflow

[Code generation is faster than ever, but shipping value isn't](https://linearb.io/blog/code-generation-faster-shipping-isnt)

Your team writes more code than ever, but less reaches production. AI moved the bottleneck to code review. Here's how to measure it and unblock your pipeline.&n...

[![Cover image for AI as a value multiplier: a human-centric approach to engineering leadership](https://assets.linearb.io/image/upload/c_limit,w_2560/f_auto/q_auto/v1/Blog_Servant_Leadership_2400x1256_0cfd4e2a0c?_a=BAVMn6ID0)](https://linearb.io/blog/ai-as-value-multiplier-human-centric-leadership)

Workflow

[AI as a value multiplier: a human-centric approach to engineering leadership](https://linearb.io/blog/ai-as-value-multiplier-human-centric-leadership)

Super.com's Matt Culver explains why AI should be used as a value multiplier, not a cost-cutter, advocating for a human-centric approach to engineering...

## Structured data

_Machine-readable metadata (JSON-LD) embedded in the page for search/AI context — not content rendered on the page itself._

```json
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "LinearB",
  "url": "https://linearb.io",
  "logo": "https://assets.linearb.io/image/upload/v1715628027/logo-mark-lg.svg",
  "description": "LinearB is the engineering productivity platform that helps engineering leaders prove AI is improving throughput without sacrificing delivery confidence, flow efficiency, or developer experience.",
  "sameAs": [
    "https://www.linkedin.com/company/linearb"
  ],
  "award": [
    {
      "@type": "Award",
      "name": "LinearB is a Leader in the 2026 Gartner® Magic Quadrant™ for Developer Productivity Insight Platforms",
      "dateAwarded": "2026",
      "awardedBy": {
        "@type": "Organization",
        "name": "Gartner®"
      }
    },
    {
      "@type": "Award",
      "name": "Great Place to Work Certification",
      "dateAwarded": "2025-2027",
      "awardedBy": {
        "@type": "Organization",
        "name": "Great Place to Work"
      }
    },
    {
      "@type": "Award",
      "name": "America's Best Startup Employers 2025",
      "dateAwarded": "2025",
      "awardedBy": {
        "@type": "Organization",
        "name": "Forbes Magazine"
      }
    }
  ],
  "hasCertification": [
    {
      "@type": "Certification",
      "name": "SOC 1 Type 2"
    },
    {
      "@type": "Certification",
      "name": "SOC 2 Type 2"
    },
    {
      "@type": "Certification",
      "name": "GDPR Compliance certification"
    },
    {
      "@type": "Certification",
      "name": "ISO 27001"
    }
  ]
}
```

```json
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How Google Uses AI to Speed Up Code Migrations by 50%",
  "url": "https://linearb.io/blog/how-google-uses-ai-to-speed-up-code-migrations",
  "author": {
    "@type": "Person",
    "name": "Ben Lloyd Pearson"
  },
  "datePublished": "2025-04-23T07:00:00.000Z",
  "dateModified": "2025-04-23T07:00:00.000Z",
  "image": "https://assets.linearb.io/image/upload/v1745366361/How_Google_Uses_AI_to_Speed_Up_Code_Migrations_by_50_f627b6e37a.png",
  "publisher": {
    "@type": "Organization",
    "name": "LinearB",
    "logo": "https://assets.linearb.io/image/upload/v1777485755/linearb-logo-2026.png"
  },
  "description": "Google used AI to automate 74% of a code migration and cut dev time by 50%. Learn how LLMs are transforming software maintenance and developer productivity"
}
```

## More on linearb.io

### Top navigation

- [Book a Demo](https://linearb.io/book-a-demo)
- [AI Code Reviews — Catch security risks, bugs, and spec mismatches](https://linearb.io/platform/ai-code-reviews)
- [AI & Productivity Insights — See how AI tools affect cycle time and delivery speed](https://linearb.io/platform/ai-developer-productivity-insights)
- [Measure AI Impact — Track AI adoption and tie it to delivery outcomes](https://linearb.io/use-case/measure-ai-impact)
- [MCP Server — Chat with your data to spot patterns and boost output](https://linearb.io/platform/mcp-server)
- [Resource Allocation — Cost initiatives and shape your investment strategy](https://linearb.io/platform/resource-allocation)
- [Cost Capitalization — Capitalize engineering costs with audit-ready reports](https://linearb.io/platform/cost-capitalization)
- [Dev Team Management — Set targets and tie throughput to business outcomes](https://linearb.io/platform/goals-and-reporting)
- [DevOps Workflow Automation — Policy-based PR routing, approvals, and tests](https://linearb.io/platform/ai-workflow-governance)
- [AI Powered Support — Unify AI and human code delivery in one clear view](https://linearb.io/use-case/ai-powered-support)
- [Optimization — Surface friction with feedback and MCP insights](https://linearb.io/platform/developer-experience)
- [Reporting — Spot what's working and what needs attention](https://linearb.io/use-case/measuring-developer-experience)
- [Surveys — Turn developer feedback into actionable signals](https://linearb.io/platform/developer-surveys)
- [Platform overview](https://linearb.io/platform/overview)
- [Register now](https://linearb.io/event/engineering-productivity-gap)
- [Customers](https://linearb.io/customers)
- [Pricing](https://linearb.io/pricing)
- [Why choose LinearB — Explore your data. Measure performance. Act to improve it.](https://linearb.io/why-linearb)
- [APEX framework — The operating model for AI-era engineering teams](https://linearb.io/resources/apex-framework)
- [Anti-FAQ — The questions other vendors won't answer](https://linearb.io/why-linearb/anti-faq)
- [Security — Enterprise-grade compliance and zero code access](https://linearb.io/security)
- [Build vs. buy — The hidden cost of building it yourself](https://linearb.io/resources/build-vs-buy)
- [Dev Interrupted Podcast — Conversations with engineering leaders](https://linearb.io/dev-interrupted/podcasts)
- [Reports & Guides — Deep dives on productivity and delivery](https://linearb.io/resources)
- [Webinars — Expert sessions on productivity and AI](https://linearb.io/resources?category=workshops)
- [Metrics Benchmarks — See how your engineering org stacks up](https://linearb.io/resources/software-engineering-benchmarks-report)
- [Blog — Product updates and practical insights](https://linearb.io/blog)
- [Help Center — Documentation, setup, and support](https://linearb.helpdocs.io)
- [API Docs](https://docs.linearb.io/api-overview)
- [Status](https://www.linearbstatus.com/)
- [Integrations](https://linearb.io/integrations)
- [LinearB is a Leader in the 2026 Gartner® Magic Quadrant™ for Developer Productivity Insight Platforms](https://linearb.io/resources/gartner-magic-quadrant-dpi-platforms-2026)
- [Sign in](https://app.linearb.io/login)
- [Enterprise](https://linearb.io/solutions/enterprise)
- [Contact](https://linearb.io/contact-us)
- [About us](https://linearb.io/about-us)
- [Careers](https://linearb.io/careers)
- [Service agreement](https://linearb.io/services-agreement)
- [Privacy policy](https://linearb.io/privacy-policy)
- [DPA](https://linearb.io/data-processing-agreement)
- [Security FAQ](https://linearb.io/security-faq)
- [Substack](https://devinterrupted.substack.com/)

### Footer

_Additional links from the site footer, not repeated from the top navigation above._

- [GitHub](https://github.com/linear-b)
- [LinkedIn](https://www.linkedin.com/company/linearb)
- [Twitter](https://twitter.com/LinearB_Inc)