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

Claim 0:
1. A method implemented by one or more processors, the method comprising:
identifying a plurality of ground truth source code, unit test pairs each including a corresponding ground truth source code unit, and a corresponding ground truth unit test for the ground truth source code unit;
for each of the ground truth source code, unit test pairs:
processing the corresponding ground truth source code unit, using a code-to-embedding machine learning model, to generate one or more corresponding code unit embeddings;
processing the corresponding ground truth unit test, using the code-to-embedding machine learning model, to generate one or more corresponding unit test embeddings; and
generating a corresponding positive training instance that includes:
the one or more corresponding code unit embeddings as input, and
the one or more corresponding unit test embeddings as output; for each of the corresponding positive training instances:
processing the corresponding one or more code unit embeddings of the input, using a code embedding-to-test embedding machine learning model, to generate one or more predicted unit test embeddings; and
generating a corresponding error based on comparing the one or more predicted unit test embeddings to the one or more corresponding unit test embeddings of the output; and

training the code embedding-to-test embedding machine learning model based on the corresponding errors.