Patent ID: 11886850
Assignee: GOOGLE LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 16:
17. At least one non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to:
obtain a predecessor source code snippet;
based on the predecessor source code snippet, select a transformation template from a library of transformation templates;
bind one or more placeholders of a predecessor portion of the selected transformation template to one or more tokens of the predecessor source code snippet to create one or more bindings; and
apply a successor portion of the transformation template to the one or more bindings to generate a predicted successor source code snippet;
wherein the library of transformation templates was generated previously by:
analyzing pre-migration and post-migration versions of source code that exist prior to and after migration of the source code;
based on the analyzing, identifying one or more transformations made to the pre-migration version of the source code to yield the post-migration version of the source code; and
building the library of transformation templates that are applicable subsequently to automate migration of new source code, wherein the building includes, for one or more of the transformations:
generating a plurality of candidate transformation templates, wherein for each candidate transformation template, different permutations of tokens of the transformation are replaced with placeholders, and
selecting one of the plurality of candidate transformation templates for inclusion in the library of transformation templates, wherein the selecting is based on one or more criteria.