Patent ID: 11972232
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
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:
detect a method declaration entered into a source code program in a source code development tool, the method declaration including a method signature without a method body, wherein the method signature includes a method name and parameter list, wherein the method declaration and the method signature are written in a same programming language;
generate a method body to complete the method declaration, wherein the method body is generated from a neural transformer model with attention given an input sequence comprising the method signature, wherein the neural transformer model with attention includes an attention component and a neural network component, wherein the attention component relates different positions of the input sequence given to the neural transformer model with attention in terms of queries Q, keys K, and values V, wherein the attention component is outside of the neural network component, wherein the neural transformer model with attention is trained to generate a method body for a target method signature on a plurality of translation tasks to learn to generate the target method body for the target method signature, wherein each translation task uses an input sequence comprising one or more of an input docstring, an input method body, or input method signature for the neural transformer model with attention to learn to generate an associated method body, an associated method signature, an associated target docstring, or a combination of the associated method body, the associated method signature, and the associated target docstring; and
present the method body as a candidate for code completion in the source code development tool.