Google’s code migration projects included replacing 32-bit identifiers with 64-bit ones in the Google Ads code base, updating testing libraries, and migrating from the Joda time library to the standard Java time package. Performing these tasks manually was originally expected to take hundreds of years of engineering.
With LLM, engineers could quickly find and update millions of lines of code. The engineer used custom scripts and code searches to find identifiers that needed to be migrated, and then used LLM-based tooling to suggest code changes. Most of the code changes (80%) were generated by artificial intelligence, and the rest were either edited by people or created by them themselves.
Although the AI still required some manual review, the process resulted in a 50% time saving compared to traditional methods. For example, the transition from JUnit3 to JUnit4 took only three months, while 87% of the code generated by artificial intelligence did not require corrections. A temporary switch from Joda to Java saved 89% of the expected switching time.