mlsanityData to 7 Oct 2026

An Empirical Study on the Usage of Transformer Models for Code Completion

arXiv 2108.01585 ↗First posted 3 Aug 2021cs.SEcited by 22

Not on the map. Why?

Abstract (arXiv)

Code completion aims at speeding up code writing by predicting the next code token(s) the developer is likely to write. Works in this field focused on improving the accuracy of the generated predictions, with substantial leaps forward made possible by deep learning (DL) models. However, code completion techniques are mostly evaluated in the scenario of predicting the next token to type, with few exceptions pushing the boundaries to the prediction of an entire code statement. Thus, little is known about the performance of state-of-the-art code completion approaches in more challenging scenarios in which, for example, an entire code block must be generated. We present a large-scale study exploring the capabilities of state-of-the-art Transformer-based models in supporting code completion at different granularity levels, including single tokens, one or multiple entire statements, up to entire code blocks (e.g., the iterated block of a for loop). We experimented with several variants of two recently proposed Transformer-based models, namely RoBERTa and the Text-To-Text Transfer Transformer (T5), for the task of code completion. The achieved results show that Transformer-based models, and in particular the T5, represent a viable solution for code completion, with perfect predictions ranging from ~29%, obtained when asking the model to guess entire blocks, up to ~69%, reached in the simpler scenario of few tokens masked from the same code statement.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). First posted on arXiv 3 Aug 2021.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2021: 1; 2022: 1; 2023: 9; 2024: 6; 2025: 2; 2026: 3.

22 papers.

Sort:

  1. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  2. 2024Language Models for Code Completion: A Practical Evaluationcited by 38
  3. 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
  4. 2023Benchmarking Causal Study to Interpret Large Language Models for Source Codecited by 14
  5. 2023Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?cited by 13
  6. 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
  7. 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingcited by 8
  8. 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 7
  9. 2024Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Studycited by 7
  10. 2024How Propense Are Large Language Models at Producing Code Smells? A Benchmarking Studycited by 6
  11. 2024Exploring Data-Efficient Adaptation of Large Language Models for Code Generationcited by 3
  12. 2023DSHGT: Dual-Supervisors Heterogeneous Graph Transformer -- A pioneer study of using heterogeneous graph learning for detecting software vulnerabilitiescited by 2
10 more
  1. 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositoriescited by 2
  2. 2021FACOS: Finding API Relevant Contents on Stack Overflow with Semantic and Syntactic Analysiscited by 1
  3. 2023Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?cited by 1
  4. 2024The Rise and Fall(?) of Software Engineeringcited by 1
  5. 2024Software Model Evolution with Large Language Models: Experiments on Simulated, Public, and Industrial Datasetscited by 1
  6. 2025SnipGen: A Mining Repository Framework for Evaluating LLMs for Codecited by 1
  7. 2023Towards Automatic Support of Software Model Evolution with Large Language~Modelscited by 0
  8. 2025Toward Explaining Large Language Models in Software Engineering Taskscited by 0
  9. 2026Towards Comprehensive Benchmarking Infrastructure for LLMs In Software Engineeringcited by 0
  10. 2026On the Impact of Code Comments for Automated Bug-Fixing: An Empirical Studycited by 0