mlsanityData to 7 Oct 2026

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

arXiv 2103.07115 ↗First posted 12 Mar 2021cs.SEcited by 22

Not on the map. Why?

Abstract (arXiv)

Code completion is one of the main features of modern Integrated Development Environments (IDEs). Its objective is to speed up code writing by predicting the next code token(s) the developer is likely to write. Research in this area has substantially bolstered the predictive performance of these techniques. However, the support to developers is still limited to the prediction of the next few tokens to type. In this work, we take a step further in this direction by presenting a large-scale empirical study aimed at exploring the capabilities of state-of-the-art deep learning (DL) 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). To this aim, we train and test several adapted variants of the recently proposed RoBERTa model, and evaluate its predictions from several perspectives, including: (i) metrics usually adopted when assessing DL generative models (i.e., BLEU score and Levenshtein distance); (ii) the percentage of perfect predictions (i.e., the predicted code snippets that match those written by developers); and (iii) the "semantic" equivalence of the generated code as compared to the one written by developers. The achieved results show that BERT models represent a viable solution for code completion, with perfect predictions ranging from ~7%, obtained when asking the model to guess entire blocks, up to ~58%, 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 12 Mar 2021.

Builds on

No reference list yet.

Built on by

Cited by year

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

22 papers.

Sort:

By area:

  1. 2024Language Models for Code Completion: A Practical Evaluationcited by 38
  2. 2023From Copilot to Pilot: Towards AI Supported Software Developmentcited by 14
  3. 2023Benchmarking Causal Study to Interpret Large Language Models for Source Codecited by 14
  4. 2023Toward a Theory of Causation for Interpreting Neural Code Modelscited by 12
  5. 2021Energy-Based Models for Code Generation under Compilability Constraintscited by 10
  6. 2024Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanationscited by 10
  7. 2023Evaluating and Explaining Large Language Models for Code Using Syntactic Structurescited by 9
  8. 2024Enhancing Computer Programming Education with LLMs: A Study on Effective Prompt Engineering for Python Code Generationcited by 9
  9. 2023Automating Code-Related Tasks Through Transformers: The Impact of Pre-trainingcited by 8
  10. 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 7
  11. 2023On the Usage of Continual Learning for Out-of-Distribution Generalization in Pre-trained Language Models of Codecited by 7
  12. 2022Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm Detectioncited by 6
10 more
  1. 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
  2. 2022NeuDep: Neural Binary Memory Dependence Analysiscited by 3
  3. 2023Transformer-based approaches to Sentiment Detectioncited by 3
  4. 2024PhishLang: A Real-Time, Fully Client-Side Phishing Detection Framework Using MobileBERTcited by 3
  5. 2022JEMMA: An Extensible Java Dataset for ML4Code Applicationscited by 2
  6. 2023Towards Automatically Addressing Self-Admitted Technical Debt: How Far Are We?cited by 1
  7. 2025LLM-driven Effective Knowledge Tracing by Integrating Dual-channel Difficultycited by 1
  8. 2025Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agentcited by 1
  9. 2024Follow-Up Questions Improve Documents Generated by Large Language Modelscited by 0
  10. 2025Mapping the Trust Terrain: LLMs in Software Engineering -- Insights and Perspectivescited by 0