paper-with-me

홈 › Papers

A Static Evaluation of Code Completion by Large Language Models

2023-06-05 · Hantian Ding, Varun Kumar, Yuchen Tian, Zijian Wang, Rob Kwiatkowski, Xiaopeng Li, Murali Krishna Ramanathan, Baishakhi Ray, Parminder Bhatia, Sudipta Sengupta, Dan Roth, Bing Xiang

Large language models trained on code have shown great potential to increase productivity of software developers. Several execution-based benchmarks have been proposed to evaluate functional correctness of model-generated code on simple programming problems. Nevertheless, it is expensive to perform the same evaluation on complex real-world projects considering the execution cost. On the contrary, static analysis tools such as linters, which can detect errors without running the program, haven't been well explored for evaluating code generation models. In this work, we propose a static evaluation framework to quantify static errors in Python code completions, by leveraging Abstract Syntax Trees. Compared with execution-based evaluation, our method is not only more efficient, but also applicable to code in the wild. For experiments, we collect code context from open source repos to generate one million function bodies using public models. Our static analysis reveals that Undefined Name and Unused Variable are the most common errors among others made by language models. Through extensive studies, we also show the impact of sampling temperature, model size, and context on static errors in code completions.

📄 PDF Abstract BibTeX arXiv:2306.03203

Code (0)

등록된 구현이 없습니다.

Tasks

Code CompletionCode Generation

Similar Papers 제목 키워드 기반

ExecRepoBench: Multi-level Executable Code Completion Evaluation

2024-12-16 · Jian Yang, Jiajun Zhang, Jiaxi Yang, Ke Jin 외

Code completion has become an essential tool for daily software development. Existing evaluation benchmarks often employ static methods that do not fully capture the dynamic nature of real-world coding environments and f…

Code Completion

Towards using Few-Shot Prompt Learning for Automating Model Completion

2022-12-07 · Meriem Ben Chaaben, Lola Burgueño, Houari Sahraoui

We propose a simple yet a novel approach to improve completion in domain modeling activities. Our approach exploits the power of large language models by using few-shot prompt learning without the need to train or fine-t…

Prompt Learning

Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Context

2024-02-06 · Yichen Li, Yun Peng, Yintong Huo, Michael R. Lyu

Large Language Models (LLMs) have achieved remarkable success in code completion, as evidenced by their essential roles in developing code assistant services such as Copilot. Being trained on in-file contexts, current LL…

Code Completion

Improving FIM Code Completions via Context & Curriculum Based Learning

2024-12-21 · Hitesh Sagtani, Rishabh Mehrotra, Beyang Liu

Fill-in-the-Middle (FIM) models play a vital role in code completion tasks, leveraging both prefix and suffix context to provide more accurate and contextually relevant suggestions. This paper presents approaches to impr…

Code Completion

MHRC-Bench: A Multilingual Hardware Repository-Level Code Completion benchmark

2026-01-07 · Qingyun Zou, Jiahao Cui, Nuo Chen, Bingsheng He 외 arxiv

Large language models (LLMs) have achieved strong performance on code completion tasks in general-purpose programming languages. However, existing repository-level code completion benchmarks focus almost exclusively on s…

Code Completion