Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Code
Patrick Barei{\ss}, Beatriz Souza, Marcelo d'Amorim, Michael Pradel

TL;DR
This study evaluates how well a pre-trained code language model, Codex, can be used to develop various code generation tools with minimal effort, showing promising results across multiple tasks.
Contribution
The paper demonstrates that few-shot learning with Codex can produce effective code tools, reducing development effort compared to traditional manual methods.
Findings
Model-based tools complement or outperform traditional tools.
Providing natural language descriptions improves model performance.
Model size and prompt design significantly influence results.
Abstract
Few-shot learning with large-scale, pre-trained language models is a powerful way to answer questions about code, e.g., how to complete a given code example, or even generate code snippets from scratch. The success of these models raises the question whether they could serve as a basis for building a wide range code generation tools. Traditionally, such tools are built manually and separately for each task. Instead, few-shot learning may allow to obtain different tools from a single pre-trained language model by simply providing a few examples or a natural language description of the expected tool behavior. This paper studies to what extent a state-of-the-art, pre-trained language model of code, Codex, may serve this purpose. We consider three code manipulation and code generation tasks targeted by a range of traditional tools: (i) code mutation; (ii) test oracle generation from natural…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Software Engineering Research
