Published in AI

Google claims its AI dogfood sped up internal migrations

by on16 January 2025


Up to 50 per cent

Google claims that its own dog fooding of AI has been really good for its internal code migrations.

aIn a pre-print paper, Google computer scientists Stoyan Nikolov, Daniele Codecasa, Anna Sjovall, Maxim Tabachnyk, Satish Chandra, Siddharth Taneja, and Celal looked into: "How is Google using AI for internal code migrations?"

"We see evidence that the use of LLMs can reduce the time needed for migrations significantly, and can reduce barriers to get started and complete migration programs," the authors said

The paper looks at  bespoke AI tools developed for Ads, Search, Workspace and YouTube, instead of generic AI tools that provide broadly applicable services like code completion, code review, and question answering.

Google's code migration projects involved changing 32-bit IDs in the 500-plus-million-line codebase for Google Ads to 64-bit IDs; converting its old JUnit3 testing library to JUnit4; and replacing the Joda time library with Java's standard java.time package.

The int32 to int64 migration was a significant project as IDs were generically defined (int32_t in C++ or Integer in Java) and were not easily searchable. They existed in tens of thousands of code locations across thousands of files.

"The full effort, if done manually, was expected to require hundreds of software engineering years and complex crossteam coordination," the googler’s said.

The result was that 80 percent of the code modifications in the change lists (CLs) were purely the product of AI; the remainder were either human-authored or human-edited AI suggestions.

"We discovered that in most cases, the human needed to revert at least some changes the model made that were either incorrect or not necessary," the authors observe. "Given the complexity and sensitive nature of the modified code, effort has to be spent in carefully rolling out each change to users."

Even with the need to double-check the LLM's work, the authors estimate that the time required to complete the migration was reduced by 50 percent.

It took just three months to migrate 5,359 files and modify 149,000 lines of code to complete the JUnit3-JUnit4 transition. Approximately 87 per cent of the code generated by AI ended up being committed with no changes.

he Joda-Java time framework switch was 89 per cent compared to the projected manual change time.

"LLMs offer a significant opportunity for assisting, modernizing and updating large codebases. They come with a lot of flexibility, and thus, a variety of code transformation tasks can be framed in a similar workflow and achieve success. This approach has the potential to radically change the way code is maintained in large enterprises," the report concluded.

Last modified on 16 January 2025
Rate this item
(0 votes)

Read more about: