Code completion with statistical language models
The DOI matches its Crossref record; 30 of the 30 references it cites were found in a registry or an index.
Abstract
We address the problem of synthesizing code completions for programs using APIs. Given a program with holes, we synthesize completions for holes with the most likely sequences of method calls. Our main idea is to reduce the problem of code completion to a natural-language processing problem of predicting probabilities of sentences. We design a simple and scalable static analysis that extracts sequences of method calls from a large codebase, and index these into a statistical language model. We then employ the language model to find the highest ranked sentences, and use them to synthesize a code completion. Our approach is able to synthesize sequences of calls across multiple objects together with their arguments. Experiments show that our approach is fast and effective. Virtually all computed completions typecheck, and the desired completion appears in the top 3 results in 90% of the cases.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Elman, J. L. (1990) · Cognitive Science · doi:10.1207/s15516709cog1402_1 · Cited by 11,212
A neural probabilistic language model
BengioYoshua, DucharmeRéjean, VincentPascal, & JanvinChristian (2003) · Journal of Machine Learning Research · doi:10.5555/944919.944966 · Cited by 2,644
Improved backing-off for M-gram language modeling
Kneser, R., & Ney, H. (2002) · 1995 International Conference on Acoustics, Speech, and Signal Processing · doi:10.1109/icassp.1995.479394 · Cited by 1,473
Points-to analysis in almost linear time
Steensgaard, B. (1996) · Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '96 · doi:10.1145/237721.237727 · Cited by 1,088
Discovering models of software processes from event-based data
Cook, J. E., & Wolf, A. L. (1998) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/287000.287001 · Cited by 870
Witten, I. H., & Bell, T. C. (1991) · IEEE Transactions on Information Theory · doi:10.1109/18.87000 · Cited by 729
Ammons, G., Bodík, R., & Larus, J. R. (2002) · Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages · doi:10.1145/503272.503275 · Cited by 665
Combinatorial sketching for finite programs
Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., & Saraswat, V. (2006) · Proceedings of the 12th international conference on Architectural support for programming languages and operating systems · doi:10.1145/1168857.1168907 · Cited by 635
On the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Dévanbu, P. (2012) · doi:10.5555/2337223.2337322 · Cited by 541
Strategies for training large scale neural network language models
Mikolov, T., Deoras, A., Povey, D., Burget, L., & Cernocky, J. (2011) · 2011 IEEE Workshop on Automatic Speech Recognition & Understanding · doi:10.1109/asru.2011.6163930 · Cited by 509
MAPO: Mining and Recommending API Usage Patterns
Zhong, H., Xie, T., Zhang, L., Pei, J., & Mei, H. (2009) · Lecture Notes in Computer Science · doi:10.1007/978-3-642-03013-0_15 · Cited by 410
Perracotta: mining temporal API rules from imperfect traces
Yang, J., Evans, D., Bhardwaj, D., Bhat, T., & Das, M. (2006) · Proceedings of the 28th international conference on Software engineering · doi:10.1145/1134285.1134325 · Cited by 406
Parseweb: a programmer assistant for reusing open source code on the web
Thummalapenta, S., & Xie, T. (2007) · Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering · doi:10.1145/1321631.1321663 · Cited by 391
Using structural context to recommend source code examples
Holmes, R., & Murphy, G. C. (2005) · Proceedings of the 27th international conference on Software engineering - ICSE '05 · doi:10.1145/1062455.1062491 · Cited by 379
Reiss, S. P. (2009) · 2009 IEEE 31st International Conference on Software Engineering · doi:10.1109/icse.2009.5070525 · Cited by 307
From program verification to program synthesis
Srivastava, S., Gulwani, S., & Foster, J. S. (2010) · Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages · doi:10.1145/1706299.1706337 · Cited by 267
Jungloid mining: helping to navigate the API jungle
Mandelin, D., Xu, L., Bodík, R., & Kimelman, D. (2005) · Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation · doi:10.1145/1065010.1065018 · Cited by 261
Mining Temporal Specifications for Error Detection
Weimer, W., & Necula, G. C. (2005) · Lecture Notes in Computer Science · doi:10.1007/978-3-540-31980-1_30 · Cited by 253
Dimensions in program synthesis
Gulwani, S. (2010) · Proceedings of the 12th international ACM SIGPLAN symposium on Principles and practice of declarative programming · doi:10.1145/1836089.1836091 · Cited by 238
Recurrent neural network based language modeling in meeting recognition
Kombrink, S., Mikolov, T., Karafiát, M., & Burget, L. (2011) · Interspeech 2011 · doi:10.21437/interspeech.2011-720 · Cited by 198
The Sketching Approach to Program Synthesis
Solar-Lezama, A. (2009) · Lecture notes in computer science · doi:10.1007/978-3-642-10672-9_3 · Cited by 165
Static specification mining using automata-based abstractions
Shoham, S., Yahav, E., Fink, S. J., & Pistoia, M. (2007) · International Symposium on Software Testing and Analysis · doi:10.1145/1273463.1273487 · Cited by 157
Self-citationEnabling static analysis for partial java programs
Dagenais, B., & Hendren, L. (2008) · Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications · doi:10.1145/1449764.1449790 · Cited by 143
Complete completion using types and weights
Gvero, T., Kuncak, V., Kuraj, I., & Piskac, R. (2013) · Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2491956.2462192 · Cited by 131
Type-directed completion of partial expressions
Perelman, D., Gulwani, S., Ball, T., & Grossman, D. (2012) · ACM-SIGPLAN Symposium on Programming Language Design and Implementation · doi:10.1145/2254064.2254098 · Cited by 115
Deriving linearizable fine-grained concurrent objects
Vechev, M., & Yahav, E. (2008) · ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) · doi:10.1145/1375581.1375598 · Cited by 112
Self-citationTypestate-based semantic code search over partial programs
Mishne, A., Shoham, S., & Yahav, E. (2012) · Conference on Object-Oriented Programming Systems, Languages, and Applications · doi:10.1145/2384616.2384689 · Cited by 112
Self-citationStrathcona example recommendation tool
Holmes, R., Walker, R. J., & Murphy, G. C. (2005) · Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineering · doi:10.1145/1081706.1081744 · Cited by 83
Mining temporal specifications from object usage
Wasylkowski, A., & Zeller, A. (2011) · Automated Software Engineering · doi:10.1007/s10515-011-0084-1 · Cited by 67
Data-driven synthesis for object-oriented frameworks
Yessenov, K., Xu, Z., & Solar-Lezama, A. (2011) · Conference on Object-Oriented Programming Systems, Languages, and Applications · doi:10.1145/2048066.2048075 · Cited by 23
Cited by
Competition-level code generation with AlphaCode
Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., Eccles, T., Keeling, J., Gimeno, F., Dal Lago, A., et al. (2022) · Science · doi:10.1126/science.abq1158 · Cited by 1,043
Competition-Level Code Generation with AlphaCode
Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., Eccles, T., Keeling, J., Gimeno, F., Lago, A. D., et al. (2022) · arXiv · doi:10.48550/arxiv.2203.07814 · Cited by 1,043
A Novel Neural Source Code Representation Based on Abstract Syntax Tree
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., & Liu, X. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00086 · Cited by 655
Gu, X., Zhang, H., Zhang, D., & Kim, S. (2016) · Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2950290.2950334 · Cited by 485
IntelliCode compose: code generation using transformer
Svyatkovskiy, A., Deng, S. K., Fu, S., & Sundaresan, N. (2020) · Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3368089.3417058 · Cited by 474
Metadata
- Authors
- Raychev, V., Vechev, M., & Yahav, E.
- Venue
- ACM SIGPLAN Notices
- Published
- 2014-06-05
- Volume
- 49
- Issue
- 6
- Pages
- 419-428
- ISSN
- 0362-1340 (ISSN-L)
- 1558-1160
- OpenAlex
- W3005855585
- Cited by
- 189
- References
- 30
- FWCI
- 34.21
- Type
- journal article
- Language
- en
- Open access
- closed
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.