CPC G06F 8/35 (2013.01) [G06F 17/18 (2013.01); G06N 3/084 (2013.01); G06N 3/088 (2013.01); G06N 5/046 (2013.01)] | 14 Claims |
1. A system comprising:
one or more processors; and
a memory that stores one or more programs that are configured to be executed by the one or more processors, the one or more programs including instructions to perform actions that:
pre-train a first neural transformer model with attention with a first unsupervised training dataset to learn semantic relationships of a natural language, the first unsupervised training dataset comprising a plurality of sequences of the natural language;
pre-train the first neural transformer model with attention with a second unsupervised training dataset to learn syntax of a programming language and se mantic relationships of code elements of the programming language, the second unsupervised training dataset comprising a plurality of sequences of source code from source code methods of the programming language;
fine-tune the first neural transformer model with attention with a supervised training dataset to learn to generate a unit test case fora given focal method written in the programming language, wherein the supervised dataset comprises mapped unit test case pairs, wherein a mapped unit test case pair of the mapped unit test case pairs includes a focal method and an associated unit test case written in the programming language, wherein fine-tuning the first neural transformer model with attention with the supervised training dataset is a translation task with a training objective that learns a mapping of a focal method to a unit test case, fmi→tci, as a conditional probability P(tci, fmi); and
deploy the first neural transformer model with attention in a unit test case generation system to predict a unit test case fora target method of a source code program.
|