Migrating Code At Scale With LLMs At Google
How Google automated large-scale code migrations using LLMs, reducing developer effort by 50% and generating over 70% of code changes through AI-assisted tooling.
Developers often evolve existing software systems by making internal changes known as migrations—such as adopting a new framework, improving implementation efficiency, or upgrading dependencies. These migrations are common, typically continuous maintenance tasks that may be performed manually or with tooling. However, certain migrations are labor-intensive, costly, and unrewarding, often taking years to complete. As a result, automation is preferred for such efforts. In this paper, we describe a large-scale, costly, and traditionally manual migration project at Google. We propose a novel automated approach that combines change location discovery with a Large Language Model (LLM) to assist developers in carrying out migrations. We present the results of a year-long case study and share key lessons learned. Our case study involved 39 distinct migrations conducted by three developers over twelve months. In total, 595 code changes comprising 93,574 edits were submitted. Of these, 74.45% of the code changes and 69.46% of the edits were generated by the LLM. Developers reported high satisfaction with the tooling and estimated a 50% reduction in total migration time compared to prior manual efforts. These results suggest that an automated, LLM-assisted workflow can significantly improve the efficiency of large-scale code migrations and may serve as a model for similar initiatives.
- Celal Ziftci
- Stoyan Nikolov
- Anna Sjövall
- Bo Kim
- Daniele Codecasa
- Abi Noda