Google actively uses its own tools based on artificial intelligence to modernize internal code bases. In the recent a scientific article the company’s specialists described how large language models (LLM) helped to reduce the time of code migration at large projects by hundreds of times. These processes included complex tasks, such as the transition to 64-bit identifiers in the Google ADS system, updating the Junit3 library to Junit4 and the replacement of the JODA library with Java Time.
The task of switching to 64-bit identifiers covered more than 500 million lines of code in tens of thousands of files. Manual implementation would require hundreds of man-years of work and complex coordination between the teams. However, thanks to the LLM systems, Google was able to significantly reduce the volume of manual labor. Artificial intelligence tools automatically made changes, which were then checked by engineers and passed as a roar. The final data showed that 80% of the modifications were made by AI, and 87% of them were accepted unchanged.
It took only three months to swunit3 to the Junit3. During this time, 5,359 files were updated and about 150 thousand lines of code were changed. Similarly, the transition from JODA to Java Time allowed to save 89% of the time that would be required for manual completion of the task.
The authors emphasize that LLM not only accelerate modernization, but also complement traditional migration methods, such as the use of syntactic trees and search scripts. Nevertheless, due to the high cost of processing large volumes of data, it is recommended to use it together with other tools.
Google notes that the use of AI for such tasks has already changed the approach to development: the volume of the code created using AI now exceeds the volume of manually written code. This indicates the significant possibilities of technologies for automation of complex tasks in large companies.