Back to results
US 11,379,190 B2Granted
Deep learning enhanced code completion system
AssigneeMicrosoft Technology Licensing, LLC
InventorsAlexey Svyatkovskiy, Shengyu Fu, Neelakantan Sundaresan, Ying Zhao
Life of this patent
Estimating the term…
Abstract
A code completion tool uses a deep learning model to predict the likelihood of a method completing a method invocation. In one aspect, the deep learning model is a LSTM trained on features that represent the syntactic context of a method invocation derived from an abstract tree representation of the code fragment.
Claims20
A system comprising:
- one or more processors;
- and a memory;
- one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions to perform acts that:
- detect in a source code editor, initiation of a method invocation in a source code program;
- extract a context of the method invocation from the source code program;
- generate an input embedding of the context of the method invocation;
- and
- predict at least one method name to complete the method invocation using a deep learning model, wherein the deep learning model generates an output probability distribution for a vocabulary of the deep learning model, wherein the output probability distribution is computed as a product of the input embedding and a predicted embedding vector, wherein the predicted embedding vector is based on a last hidden state of the deep learning model.
5 more elements
A computer-implemented method, comprising:
- receiving a context of a method invocation in a source code program;
- generating an input embedding of the context;
- predicting a method to complete the method invocation based on an output probability distribution generated by a deep learning model, wherein the deep learning model generates the output probability distribution as a function of the input embedding and a predicted word embedding, wherein the predicted word embedding is based on a last hidden state of the deep learning model;
- and
- outputting a candidate to complete the method invocation based on a high probability of the candidate from the output probability distribution.
2 more elements
A device, comprising:
- a processor and a memory;
- wherein the processor is configured to perform instructions in the memory that when executed perform acts that:
- extract a context of a method invocation in a source code program under development, the method invocation including a class name;
- produce an input embedding of the context;
- obtain one or more candidates to complete the method invocation from a deep learning model, wherein the deep learning model generates an output probability distribution of method names to complete the method invocation as a function of the input embedding and a predicted word embedding, wherein the predicted word embedding is based on a last hidden state of the deep learning model;
- and
- output the one or more candidates having a high probability from the output probability distribution.
4 more elements
Dependencies are inferred from the claim text.