Microsoft Corporation
SOURCE CODE GENERATION USING CODE TEMPLATES WITH NEURAL TRANSFORMERS

Last updated:

Abstract:

A source code generation system uses a neural transformer model with attention to predict candidate method bodies given a method docstring, method signature, and one or more method templates. The method templates are derived from intent-snippet pairs from StackOverflow question/answer pairs or template methods from GitHub. Joint embeddings are generated for the method bodies of the method templates and associated method docstrings for quick retrieval. A code completion system uses the source code generation system to generate candidate method bodies to complete a method signature and/or method docstring using the method templates.

Status:
Application
Type:

Utility

Filling date:

1 Apr 2021

Issue date:

4 Aug 2022