Combining Program Analysis and Statistical Language Model for Code Statement Completion
Not on the map. Why?
Abstract (arXiv)
Automatic code completion helps improve developers' productivity in their programming tasks. A program contains instructions expressed via code statements, which are considered as the basic units of program execution. In this paper, we introduce AutoSC, which combines program analysis and the principle of software naturalness to fill in a partially completed statement. AutoSC benefits from the strengths of both directions, in which the completed code statement is both frequent and valid. AutoSC is first trained on a large code corpus to derive the templates of candidate statements. Then, it uses program analysis to validate and concretize the templates into syntactically and type-valid candidate statements. Finally, these candidates are ranked by using a language model trained on the lexical form of the source code in the code corpus. Our empirical evaluation on the large datasets of real-world projects shows that AutoSC achieves 38.9-41.3% top-1 accuracy and 48.2-50.1% top-5 accuracy in statement completion. It also outperforms a state-of-the-art approach from 9X-69X in top-1 accuracy.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). First posted on arXiv 18 Nov 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 1; 2023: 2; 2024: 1; 2025: 1.
5 papers.
- 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 50
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
- 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 8
- 2023ARIST: An Effective API Argument Recommendation Approachcited by 2
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
- 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completion23 Sep 2024
- 2023ARIST: An Effective API Argument Recommendation Approach11 Jun 2023
- 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Study24 Apr 2023
- 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequences14 Feb 2022