AI-Powered Google Code Migration: 50% Faster

 

### Google’s AI-Powered Code Migration Case Study and Achievements

Google has successfully applied AI to code migration internally, attracting significant attention. The company achieved over 50% time savings during the process, proving the potential of LLMs (Large Language Models) in large-scale codebases. This document delves into the key points of Google’s case.


1. Background and Necessity of Code Migration

Google’s products and services are based on a vast codebase. However, transitioning old code to the latest tech stack takes significant time and manpower. The issues were particularly pronounced in these three main cases:

  • Google Ads 32-bit ID → 64-bit ID Conversion
    The Google Ads codebase used 32-bit IDs, which had to be changed to 64-bit. This process involved identifying and modifying code spread across hundreds of thousands of locations.
  • Test Framework Transition (JUnit3 → JUnit4)
    The use of JUnit3 had to be discontinued in favor of JUnit4. This required changes in approximately 5,359 files and 149,000 lines of code.
  • Time Library Change (Joda → Java.time)
The legacy Joda library was transitioned to the standard Java.time library. This decision aimed to modernize code and enhance maintainability.

2. AI Introduction and LLM Utilization

Google automated these migration processes by leveraging LLMs. Below is a summary of the introduced workflow:

(1) Stages of AI-Based Migration

  1. Problem Definition and Code Identification
    • Engineers used code search tools (Kythe) and scripts to identify the code to be changed.
    • They determined whether the code needed modification.
  2. Application of LLM Toolkit
    • The AI model analyzed the code and suggested changes.
    • AI-generated code that passed unit tests went to manual review.
  3. Manual Review and Final Modification
-   80% of the code generated by the LLM was usable without modifications, while the rest required manual changes by engineers.
  1. Code Review and Team Approval
    • Each code change was reviewed by developers in the relevant areas and then merged.

3. Key Achievements and Results

By implementing AI, Google achieved the following:

  • Time Savings
    • The JUnit3 → JUnit4 transition took 3 months, resulting in 50% time savings compared to previous estimates.
    • The Joda → Java.time transition achieved time savings of up to 89%.
  • Increased Productivity
    • Approximately 87% of the code was committed as directly generated by the LLM.
    • It was more efficient and had a lower error rate compared to the existing manual process.
  • Flexible Applicability
-   Various code transformations (data types, libraries, frameworks) could be handled with the same workflow.
  • Increased LLM-Based Code Writing
    • According to Google statistics, the proportion of code completed using AI exceeded the amount of code developers typed manually.

4. Limitations and Areas for Improvement

Despite the positive results of LLMs, several limitations and improvements exist:

  • Need for Human Review
    • Some code created by the AI model contained errors or unnecessary changes, still requiring review and modification by developers.
  • Cost Issues
    • The cost of using AI models was relatively high, potentially reducing efficiency compared to manual work.
    • The cost could increase exponentially, especially for large-scale projects.
  • Need for Additional Tools
-   More sophisticated verification tools and workflows are needed to mitigate bottlenecks in the human review process.

5. The Future of Code Maintenance Utilizing LLMs

Google’s case shows that LLMs can become a key tool in updating and modernizing large-scale codebases.

  • Potential for Increased Adoption within Enterprises
    • Can be used for various tasks, such as code review, code writing assistance, and refactoring.
  • Hybrid Use of AI and Traditional Tools
    • While LLMs offer high flexibility, using them alongside existing tools like Abstract Syntax Trees (AST) can be more efficient.
  • Long-term Trends
-   Google’s case suggests that LLM-based workflows have the potential to revolutionize how large-scale IT maintenance is handled.

6. Conclusion

Google’s case serves as a good example of how AI, especially LLMs, can contribute innovatively to complex tasks like code migration. However, considering issues such as cost and the review process, AI is not a standalone solution but rather works best in conjunction with existing methods. It is highly anticipated how this technology will change the standard for IT in the future!

*Source URL:
https://www.theregister.com/2025/01/16/google_ai_code_migration/

google AI

  ### Google’s AI-Powered Code Migration Case Study and Achievements Google has successfully applied AI to code migration internally, attracting significant attention. The company achieved over 50% time savings during the process, proving the potential of LLMs (Large Language Models) in large-scale codebases. This document delves into the key points of Google’s case. 1. Background…

Leave a Reply

Your email address will not be published. Required fields are marked *

Feature is an online magazine made by culture lovers. We offer weekly reflections, reviews, and news on art, literature, and music.

Please subscribe to our newsletter to let us know whenever we publish new content. We send no spam, and you can unsubscribe at any time.