mlsanityData to 14 Oct 2026

A Static Evaluation of Code Completion by Large Language Models

arXiv 2306.03203 ↗First posted 5 Jun 2023cs.CL cs.SEcited by 14

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Builds on 16 of its 30 references that are in the map. First posted on arXiv 5 Jun 2023.

Builds on

16 of 30 references.

References · 16

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2021Program Synthesis with Large Language Modelscited by 3,637
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  6. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  7. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  8. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  9. 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
  10. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  11. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  12. 2022Multi-lingual Evaluation of Code Generation Modelscited by 159
4 more
  1. 2018An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translationcited by 108
  2. 2022Productivity Assessment of Neural Code Completioncited by 98
  3. 2019Pythia: AI-assisted Code Completion Systemcited by 55
  4. 2021The Prevalence of Code Smells in Machine Learning projectscited by 16

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 3; 2024: 9; 2025: 1; 2026: 1.

14 papers.

Sort:

By area: