Code Template Inference Using Language Models
Date:
This work project explores the use of natural language processing (NLP) techniques to automatically identify project-specific code templates—frequently used code blocks that can assist developers within an integrated development environment (IDE). During software development, programmers often, sometimes unknowingly, rewrite similar code fragments that implement common functionality. Recognizing these recurring patterns can inform the creation of reusable code templates.
While most code editors support templates, developers typically need to manually define and register them, and existing systems offer limited contextual suggestions based on the editing environment. To address these limitations, our approach applies n-gram language models to detect and recommend relevant templates dynamically, tailored to the programmer’s current editing context.
