Migrating Code At Scale With LLMs At Google

📅 2025-04-13
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
To address the high cost and labor-intensive nature of large-scale internal software migrations, this paper proposes the first LLM-driven, end-to-end automated migration workflow. Our method integrates a change-location identification algorithm with fine-tuned or prompt-optimized large language models (LLMs) to jointly perform migration-point detection, semantics-aware code generation, and production-ready patch synthesis—enabling a closed-loop migration process. The workflow is deeply integrated with Google’s internal codebase and CI/CD toolchain, and incorporates static code semantic analysis to ensure generation quality. Over a 12-month deployment, it successfully completed 39 migrations, producing 595 changes (93,574 edits), of which 74.45% of changes and 69.46% of edits were LLM-generated. Total migration time decreased by 50%, and developer satisfaction improved significantly. This work represents the first industrial-scale integration of LLMs across the full migration lifecycle, substantially enhancing scalability and human-AI collaboration efficiency.

Technology Category

Machine Learning: Large Multimodal Models (LMMs)Natural Language Processing: Code Generation / Program Synthesis from Natural LanguagePlanning, Routing, and Scheduling: Planning with Language Models

Application Category

Economics, Online Markets and Human Computation: Cost models of using LLMs in production systemsUser Modeling, Personalization and Recommendation: Large Language Models (LLM) for user modeling and recommendationSemantics and Knowledge: Data modeling to support human-machine intelligence, including LLMs agents, intelligent system behavior, explanations, and user-friendly interactions
📝 Abstract
Developers often evolve an existing software system by making internal changes, called migration. Moving to a new framework, changing implementation to improve efficiency, and upgrading a dependency to its latest version are examples of migrations. Migration is a common and typically continuous maintenance task undertaken either manually or through tooling. Certain migrations are labor intensive and costly, developers do not find the required work rewarding, and they may take years to complete. Hence, automation is preferred for such migrations. In this paper, we discuss a large-scale, costly and traditionally manual migration project at Google, propose a novel automated algorithm that uses change location discovery and a Large Language Model (LLM) to aid developers conduct the migration, report the results of a large case study, and discuss lessons learned. Our case study on 39 distinct migrations undertaken by three developers over twelve months shows that a total of 595 code changes with 93,574 edits have been submitted, where 74.45% of the code changes and 69.46% of the edits were generated by the LLM. The developers reported high satisfaction with the automated tooling, and estimated a 50% reduction on the total time spent on the migration compared to earlier manual migrations. Our results suggest that our automated, LLM-assisted workflow can serve as a model for similar initiatives.
Problem

Research questions and friction points this paper is trying to address.

Automating large-scale code migrations at Google
Reducing manual effort in framework and dependency updates
Enhancing efficiency with LLM-assisted change generation
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated algorithm for large-scale code migration
LLM-assisted change location discovery
Significant reduction in manual migration time
🔎 Similar Papers
2024-03-252024 IEEE/ACM First International Conference on AI Foundation Models and Software Engineering (Forge) Conference Acronym:Citations: 22
C
Celal Ziftci
Google, New York, NY, USA
S
Stoyan Nikolov
Google, Munich, Germany
A
Anna Sjovall
Google, Munich, Germany
B
Bo Kim
Google, New York, NY, USA
D
Daniele Codecasa
Google, Munich, Germany
M
Max Kim
Google, Mountain View, CA, USA