On the localness of software
The DOI matches its Crossref record; 52 of the 52 references it cites were found in a registry or an index.
Abstract
The n-gram language model, which has its roots in statistical natural language processing, has been shown to successfully capture the repetitive and predictable regularities (“naturalness") of source code, and help with tasks such as code suggestion, porting, and designing assistive coding devices. However, we show in this paper that this natural-language-based model fails to exploit a special property of source code: localness. We find that human-written programs are localized: they have useful local regularities that can be captured and exploited. We introduce a novel cache language model that consists of both an n-gram and an added “cache" component to exploit localness. We show empirically that the additional cache component greatly improves the n-gram approach by capturing the localness of software, as measured by both cross-entropy and suggestion accuracy. Our model’s suggestion accuracy is actually comparable to a state-of-the-art, semantically augmented language model; but it is simpler and easier to implement. Our cache language model requires nothing beyond lexicalization, and thus is applicable to all programming languages.
Overview
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
In the citing paper
“Vocabularies of a project are highly local, and functions from the same projects are likely to share same set of identifiers [10,22].”
From Few-shot training LLMs for project-specific code-summarization (2022) · cites this paper as [22]
In the citing paper
“It's been well-known right from the outset that language modeling for code has to deal with project-specific phenomena [10,11,22].”
From Few-shot training LLMs for project-specific code-summarization (2022) · cites this paper as [22]
Citations
Cites
(1992) · doi:10.5555/176313.176316 · Cited by 2,892
A statistical approach to machine translation
Brown, P. F., Cocke, J., Pietra, S. A. D., Pietra, V. J. D., Jelinek, F., Lafferty, J., Mercer, R. L., & Roossin, P. S. (1990) · doi:10.5555/92858.92860 · Cited by 1,655
Estimation of probabilities from sparse data for the language model component of a speech recognizer
Katz, S. (1987) · IEEE Transactions on Acoustics, Speech, and Signal Processing · doi:10.1109/tassp.1987.1165125 · Cited by 1,637
A Maximum Likelihood Approach to Continuous Speech Recognition
Bahl, L. R., Jelinek, F., & Mercer, R. L. (1983) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/tpami.1983.4767370 · Cited by 1,212
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
Self-citationTowards automatically generating summary comments for Java methods
Sridhara, G., Hill, E., Muppaneni, D., Pollock, L., & Vijay-Shanker, K. (2010) · Proceedings of the IEEE/ACM international conference on Automated software engineering · doi:10.1145/1858996.1859006 · Cited by 514 · cited 1×
“on GitHub and BitBucket), software engineering researchers have turned to empirical methods to study the process of developing and maintaining software [11, 27, 38, 40, 42–45, 47, 49].”
MethodSemantic clustering: Identifying topics in source code
Kuhn, A., Ducasse, S., & Gîrba, T. (2007) · Information and Software Technology · doi:10.1016/j.infsof.2006.10.017 · Cited by 496
A cache-based natural language model for speech recognition
Kuhn, R., & De Mori, R. (1990) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/34.56193 · Cited by 495
Using task context to improve programmer productivity
Kersten, M., & Murphy, G. C. (2006) · Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering · doi:10.1145/1181775.1181777 · Cited by 452
Dixon, W. J., & Mood, A. M. (1946) · Journal of the American Statistical Association · doi:10.1080/01621459.1946.10501898 · Cited by 422
Research works printed but not linked: 4
- 10.5555/2487085.2487127 · doi:10.5555/2487085.2487127
- M. Broy , F. Deißenböck , and M. Pizka . A holistic approach to software quality at work. In 3WCSQ , 2005 . M. Broy, F. Deißenböck, and M. Pizka. A holistic approach to software quality at work. In 3WCSQ, 2005.
- K. Knight . Bayesian inference with tears . Tutorial Workbook , 2009 . K. Knight. Bayesian inference with tears. Tutorial Workbook, 2009.
- 10.1145/1062455.1062526 · doi:10.1145/1062455.1062526 · Paper page
Cited by
Automatically learning semantic features for defect prediction
Wang, S., Liu, T., & Tan, L. (2016) · Proceedings of the 38th International Conference on Software Engineering · doi:10.1145/2884781.2884804 · Cited by 689
Deep learning code fragments for code clone detection
White, M., Tufano, M., Vendome, C., & Poshyvanyk, D. (2016) · Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/2970276.2970326 · Cited by 558
“They are also limited by the amount of context they consider [75], yet the novel approach of casting applications in terms of “naturalness” in SE contexts has spawned many applications of this technology to new problems.”
BackgroundGu, 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
“Statistical language models have been adapted to many software engineering tasks [26] such as learning natural code conventions [5], code suggestion [44], and code completion [37].”
MethodA Convolutional Attention Network for Extreme Summarization of Source Code
Allamanis, M., Peng, H. M., & Sutton, C. A. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1602.03001 · Cited by 126
“Research has mostly focused on tokenlevel (Nguyen et al., 2013; Tu et al., 2014) and syntax-level (Maddison & Tarlow, 2014) language models of code and translation between programming languages (Karaivanov”
BackgroundOn the naturalness of software
Hindle, A., Barr, E. T., Gabel, M., Su, Z., & Devanbu, P. (2016) · Communications of the ACM · doi:10.1145/2902362 · Cited by 307
“However, we note that these are very early efforts in this area, and new software language models 35, 49 and estimation techniques have improved on the results presented below.”
BackgroundSelf-citationAre deep neural networks the best choice for modeling source code?
Hellendoorn, V. J., & Devanbu, P. (2017) · Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering · doi:10.1145/3106237.3106290 · Cited by 292
On the "naturalness" of buggy code
Ray, B., Hellendoorn, V., Godhane, S., Tu, Z., Bacchelli, A., & Devanbu, P. (2016) · Proceedings of the 38th International Conference on Software Engineering · doi:10.1145/2884781.2884848 · Cited by 252
“’s cache-based language model ($gram) tool [53], as described in Section 2.”
BackgroundMethodInfluentialSelf-citationLearning to Generate Pseudo-Code from Source Code Using Statistical Machine Translation
Oda, Y., Fudaba, H., Neubig, G., Hata, H., Sakti, S., Toda, T., & Nakamura, S. (2015) · 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2015.36 · Cited by 250
“…this study: MeCab to tokenize Japanese sentences [29], pialign to train word alignments [22], KenLM to train Kneser-Ney smoothed language model [30], Moses to train and generate target sentences using the PBMT model [31], and Travatar to train and generate target sentences using T2SMT models [32].”
DeepJIT: An End-to-End Deep Learning Framework for Just-in-Time Defect Prediction
Hoang, T., Khanh Dam, H., Kamei, Y., Lo, D., & Ubayashi, N. (2019) · 2019 IEEE/ACM 16th International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2019.00016 · Cited by 223
Few-shot training LLMs for project-specific code-summarization
Ahmed, T., & Devanbu, P. (2022) · Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3551349.3559555 · Cited by 240
“Vocabularies of a project are highly local, and functions from the same projects are likely to share same set of identifiers [10, 22].”
BackgroundToward Deep Learning Software Repositories
White, M., Vendome, C., Linares-Vasquez, M., & Poshyvanyk, D. (2015) · 2015 IEEE/ACM 12th Working Conference on Mining Software Repositories · doi:10.1109/msr.2015.38 · Cited by 200
“Top-k accuracy has been used in previous code suggestion studies [5], [12].”
BackgroundMethodResultInfluentialMulti-task Learning based Pre-trained Language Model for Code Completion
Liu, F., Li, G., Zhao, Y., & Jin, Z. (2020) · Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3324884.3416591 · Cited by 188
“It is a classical evaluation measure for code completion and is used in almost all the previous code completion work [17, 19, 27, 41, 46].”
BackgroundMethodInfluentialAutomatic Feature Learning for Predicting Vulnerable Software Components
Dam, H. K., Tran, T., Pham, T., Ng, S. W., Grundy, J., & Ghose, A. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2018.2881961 · Cited by 184
“In fact, previous studies have demonstrated that semantic information hidden in a program is useful for various software engineering tasks such as code completion, bug detection and defect prediction [15], [18], [19], [20], [21].”
BackgroundBig code != big vocabulary: open-vocabulary models for source code
Karampatsis, R.-M., Babii, H., Robbes, R., Sutton, C., & Janes, A. (2020) · Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering · doi:10.1145/3377811.3380342 · Cited by 182
“A global LM , trained in a cross-project setting, will perform better if it is adapted to a new project [44, 81].”
BackgroundMethodInfluentialToward deep learning software repositories
White, M., Vendome, C., & Poshyvanyk, D. (2015) · Cited by 192
Sorting and Transforming Program Repair Ingredients via Deep Learning Code Similarities
White, M., Tufano, M., Martinez, M., Monperrus, M., & Poshyvanyk, D. (2019) · 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2019.8668043 · Cited by 163
API code recommendation using statistical learning from fine-grained changes
Nguyen, A. T., Hilton, M., Codoban, M., Nguyen, H. A., Mast, L., Rademacher, E., Nguyen, T. N., & Dig, D. (2016) · Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2950290.2950333 · Cited by 163
“Code suggestion techniques (e.g., n -gram model [16,52]), which rely on the code context, identify the context as the sequence of tokens preceding the variable results (in our example, the sequence ‘t.execute();’”
BackgroundMethodInfluentialExploring API Embedding for API Usages and Applications
Nguyen, T. D., Nguyen, A. T., Phan, H. D., & Nguyen, T. N. (2017) · 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2017.47 · Cited by 159
“Researchers have proposed to use language models to suggest next tokens or API calls [3], [4], [5], [27].”
MethodBimodal Modelling of Source Code and Natural Language
Allamanis, M., Tarlow, D., Gordon, A. D., & Wei, Y. (2015) · Edinburgh Research Explorer (University of Edinburgh) · Cited by 216
In-IDE Code Generation from Natural Language: Promise and Challenges
Xu, F. F., Vasilescu, B., & Neubig, G. (2021) · arXiv · doi:10.48550/arxiv.2101.11149 · Cited by 153
In-IDE Code Generation from Natural Language: Promise and Challenges
Xu, F. F., Vasilescu, B., & Neubig, G. (2022) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3487569 · Cited by 154
“There is already convincing evidence from prior work that considering a user’s local context provides unique information about what code they might type next [108].”
BackgroundProbabilistic model for code with decision trees
Raychev, V., Bielik, P., & Vechev, M. (2016) · Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications · doi:10.1145/2983990.2984041 · Cited by 148
On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot
Mastropaolo, A., Pascarella, L., Guglielmi, E., Ciniselli, M., Scalabrino, S., Oliveto, R., & Bavota, G. (2023) · 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE) · doi:10.1109/icse48619.2023.00181 · Cited by 138
“…targeted the relatively simpler problem of code completion, that has been tackled exploiting historical information [50], coding patterns mined from software repositories [21], [42], [56], [10], [41], [45], [19] and, more recently, Deep Learning (DL) models [62], [27], [29], [8], [53], [15].”
Predicting Defective Lines Using a Model-Agnostic Technique
Wattanakriengkrai, S., Thongtanunam, P., Tantithamthavorn, C., Hata, H., & Matsumoto, K. (2022) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2020.3023177 · Cited by 137
“Prior work found that statistical language models can be leveraged to help developers in many software engineering tasks such as code completion [68, 84], code convention [5], and method names suggestion [6].”
BackgroundGraph-based statistical language model for code
Nguyen, A. T., & Nguyen, T. N. (2016) · Cited by 141
Bugram: bug detection with n-gram language models
Wang, S., Chollak, D., Movshovitz-Attias, D., & Tan, L. (2016) · Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/2970276.2970341 · Cited by 118
“Previous studies that leverage n-gram models for code completion [15, 37, 47] found that 3-gram, 4-gram, 5-gram, and 6-gram models generated reasonable results.”
ResultVUDENC: Vulnerability Detection with Deep Learning on a Natural Codebase for Python
Wartschinski, L., Noller, Y., Vogel, T., Kehrer, T., & Grunske, L. (2022) · Information and Software Technology · doi:10.1016/j.infsof.2021.106809 · Cited by 124
“To account for the locality property of code [59], emphasis will be placed on the context around each code token for feature learning.”
BackgroundAn Improved CNN Model for Within-Project Software Defect Prediction
Pan, C., Lu, M., Xu, B., & Gao, H. (2019) · Applied Sciences · doi:10.3390/app9102138 · Cited by 138
CCAligner: a token based large-gap clone detector
Wang, P., Svajlenko, J., Wu, Y., Xu, Y., & Roy, C. K. (2018) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3180155.3180179 · Cited by 187
“, localness of software [53]) and can improve matching accuracy.”
BackgroundPHOG: probabilistic model for code
Bielik, P., Raychev, V., & Vechev, M. (2016) · International Conference on Machine Learning · Cited by 202
CODIT: Code Editing With Tree-Based Neural Models
Chakraborty, S., Ding, Y., Allamanis, M., & Ray, B. (2022) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2020.3020502 · Cited by 114
“, token sequences [31], [32], parse-trees [62], [63], graphs [59], [64], embedded distributed vector space [65], etc.”
BackgroundMethodGraph-Based Statistical Language Model for Code
Nguyen, A. T., & Nguyen, T. N. (2015) · 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering · doi:10.1109/icse.2015.336 · Cited by 114
“Recent research in SE [1], [14], [15], [16] has shown that ngram language model is useful in capturing fine-grained code patterns to support code suggestion (Code suggestion is the suggestion of a complete code element given a code portion).”
BackgroundStatic automated program repair for heap properties
van Tonder, R., & Goues, C. L. (2018) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3180155.3180250 · Cited by 126
“This is consistent with empirical results that suggest that code is redundant locally, especially within a module [55].”
ResultUltra-Large Repair Search Space with Automatically Mined Templates: The Cardumen Mode of Astor
Martínez, M., & Monperrus, M. (2018) · Lecture notes in computer science · doi:10.1007/978-3-319-99241-9_3 · Cited by 129
“With the same spirit that [31], the Global model aims at capturing large global and static model of variable names, whereas the cache model aims at modeling a small local (dynamic) name model estimated from the proximate local context (File or Package).”
MethodFast and Memory-Efficient Neural Code Completion
Svyatkovskiy, A., Lee, S., Hadjitofi, A., Riechert, M., Franco, J. V., & Allamanis, M. (2021) · 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00045 · Cited by 95
Characterizing the natural language descriptions in software logging statements
He, P., Chen, Z., He, S., & Lyu, M. R. (2018) · Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering · doi:10.1145/3238147.3238193 · Cited by 91
“For example, we can improve the performance of language models with a cache mechanism similar to that proposed in [53].”
BackgroundMethodInfluentialAn Empirical Study on the Usage of Transformer Models for Code Completion
Ciniselli, M., Cooper, N., Pascarella, L., Mastropaolo, A., Aghajani, E., Poshyvanyk, D., Di Penta, M., & Bavota, G. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3128234 · Cited by 94
“[77] introduced a cache component to exploit the “localness of code” in the n-gram model.”
BackgroundMethodS-gram: towards semantic-aware security auditing for Ethereum smart contracts
Liu, H., Liu, C., Zhao, W., Jiang, Y., & Sun, J. (2018) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3238147.3240728 · Cited by 93
“proposed a cache language model to include local programming patterns that are specific to personal projects [21].”
BackgroundMethodAn Empirical Study on the Usage of BERT Models for Code Completion
Ciniselli, M., Cooper, N., Pascarella, L., Poshyvanyk, D., Di Penta, M., & Bavota, G. (2021) · 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00024 · Cited by 78
A Survey of Machine Learning for Big Code and Naturalness
Allamanis, M., Barr, E. T., Devanbu, P., & Sutton, C. (2019) · ACM Computing Surveys · doi:10.1145/3212695 · Cited by 150
Just-In-Time Defect Identification and Localization: A Two-Phase Framework
Yan, M. L., Xia, X., Fan, Y., Hassan, A. E., Lo, D., & Li, S. (2020) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2020.2978819 · Cited by 105
“Tu et al. [23] proposed the “cache” mode to improve the performance of code completion by using the locality of software.”
MethodCodeFill: multi-token code completion by jointly learning from structure and naming sequences
Izadi, M., Gismondi, R., & Gousios, G. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510172 · Cited by 86
“[52] built upon an n-gram model using a cache mechanism to capture locality in source code.”
MethodSyntax and sensibility: Using language models to detect and correct syntax errors
Santos, E. A., Campbell, J. C., Patel, D., Hindle, A., & Amaral, J. N. (2018) · 2018 IEEE 25th International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2018.8330219 · Cited by 83
“Localness [54], online ngram models, or other search-based models might be feasible candidates to help resolve identifiers.”
BackgroundProbabilistic model for code with decision trees
Raychev, V., Bielik, P., & Vechev, M. (2016) · ACM SIGPLAN Notices · doi:10.1145/3022671.2984041 · Cited by 81
When Code Completion Fails: A Case Study on Real-World Completions
Hellendoorn, V. J., Proksch, S., Gall, H. C., & Bacchelli, A. (2019) · 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2019.00101 · Cited by 76
“…from restricted and changing localities, and incorporating structural information from source code [14]. n -gram models can be taught these things effectively (using structures such as caches [10] or nested architectures [14]), whereas conventional RNN architectures struggle under these conditions.”
BackgroundLearning API usages from bytecode: a statistical approach
Nguyen, T. T., Pham, H. V., Vu, P. M., & Nguyen, T. T. (2016) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/2884781.2884873 · Cited by 82
“al [39] 3-gram (cache) Lexical token Source code 9 (Java) + 9 (Python) projects 10-fold cross validation Hindle et.”
BackgroundLearning a classifier for false positive error reports emitted by static code analysis tools
Koç, U., Saadatpanah, P., Foster, J. S., & Porter, A. (2017) · ACM SIGPLAN International Workshop on Machine Learning and Programming Languages (MAPL) · doi:10.1145/3088525.3088675 · Cited by 63
“…there have been many studies using statistical language models for handling important software development and maintenance tasks (Nguyen et al. 2013; Tu et al. 2014; Raychev et al. 2014, 2015; Allamanis et al. 2015, 2016; Fowkes and Sutton 2016; Gu et al. 2016; White et al. 2016; Dam et al. 2016).”
MethodMachine Learning Based Recommendation of Method Names: How Far are We
Jiang, L. C., Liu, H., & Jiang, H. (2019) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2019.00062 · Cited by 72
“A possible reason for the significant reduction is that file-based validation leverages the nature of source code: local repetitiveness [28], [29].”
BackgroundMethodLearning Python Code Suggestion with a Sparse Pointer Network
Bhoopchand, A., Rocktäschel, T., Barr, E. T., & Riedel, S. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1611.08307 · Cited by 60
“Recently, methods from statistical natural language processing (NLP) have been used to train code suggestion systems from code usage in large code repositories (Hindle et al., 2012; Allamanis & Sutton, 2013; Tu et al., 2014).”
MethodUnderstanding the API usage in Java
Qiu, D., Li, B., & LEUNG, H. K. N. (2016) · Information and Software Technology · doi:10.1016/j.infsof.2016.01.011 · Cited by 82
SOSRepair: Expressive Semantic Search for Real-World Program Repair
Afzal, A., Motwani, M., Stolee, K. T., Brun, Y., & Goues, C. L. (2019) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2019.2944914 · Cited by 71
“Additionally, programs are locally redundant [96], and developers are more often right than”
BackgroundRevisiting, Benchmarking and Exploring API Recommendation: How Far Are We?
Peng, Y., Li, S., Gu, W., Li, Y., Wang, W., Gao, C., & Lyu, M. R. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2022.3197063 · Cited by 71
Montage: A Neural Network Language Model-Guided JavaScript Engine FuzzerPreprint
Lee, S., Han, H.-S., Cha, S. K., & Son, S. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2001.04107 · Cited by 80
“Such framing of language models has been vastly studied while addressing code completion problems [40,53].”
BackgroundRahman, M., Palani, D., & Rigby, P. C. (2019) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2019.00022 · Cited by 62
“Model Limitations: There are many natural language models that deal with sequences of tokens: n-grams, skip-grams, RNN, LSTM [17, 20, 53, 55].”
BackgroundMethodHolistic Combination of Structural and Textual Code Information for Context Based API Recommendation
Chen, C., Peng, X., Xing, Z., Sun, J., Wang, X., Zhao, Y., & Zhao, W. (2021) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3074309 · Cited by 52
Extracting code from programming tutorial videos
Yadid, S., & Yahav, E. (2016) · ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (Onward!) · doi:10.1145/2986012.2986021 · Cited by 47
“[22] show that many of the regularities in humanwritten software are local.”
BackgroundWill They Like This? Evaluating Code Contributions with Language Models
Hellendoorn, V. J., Dévanbu, P., & Bacchelli, A. (2015) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr.2015.22 · Cited by 66
Code Search is All You Need? Improving Code Suggestions with Code Search
Chen, J., Hu, X., Li, Z., Gao, C., Xia, X., & Lo, D. (2024) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3597503.3639085 · Cited by 101
“Since the naturalness of software is introduced [21], many prior studies leverage language models (LMs) [18, 57] to improve the quality of code suggestions.”
MethodA deep neural network language model with contexts for source code
Nguyen, A. T., Nguyen, T. D., Phan, H., & Nguyen, T. N. (2018) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2018.8330220 · Cited by 48
“We used the same procedure for evaluating the model’s accuracy as in the existing work [2], [29], [1].”
BackgroundMethodUser Review-Based Change File Localization for Mobile Applications
Zhou, Y., Su, Y., Chen, T., Huang, Z., Gall, H. C., & Panichella, S. (2020) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2020.2967383 · Cited by 43
“In light of this, we dynamically assign the weights to the two parts, inspired by dynamic interpolation weights [45], [46]: where γ is the number of common words which appear in both user review r i and commit tags commit j , and L is the number of words in user review r i .”
MethodTacTok: semantics-aware proof synthesis
First, E., Brun, Y., & Guha, A. (2020) · Proceedings of the ACM on Programming Languages · doi:10.1145/3428299 · Cited by 41
“Modified n -grams can be used as a cache to capture local dependencies in code [Tu et al. 2014].”
MethodMeaningful variable names for decompiled code: a machine translation approach
Jaffe, A., Lacomis, J., Schwartz, E. J., Goues, C. L., & Vasilescu, B. (2018) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3196321.3196330 · Cited by 61
“By adding this older code to the training corpus, it should be possible to improve the performance of our approach by exploiting the localness of source code [27, 28].”
MethodBilateral Dependency Neural Networks for Cross-Language Algorithm Classification
Bui, N. D. Q., Yu, Y., & Jiang, L. (2019) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2019.8667995 · Cited by 47
“Another disadvantage is that the number of tokens can be arbitrary as developers can introduce new tokens when writing code [48], making it harder to capture the relations among essentially the same tokens that appear differently.”
BackgroundMaybe Deep Neural Networks are the Best Choice for Modeling Source Code
Karampatsis, R.-M., & Sutton, C. A. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1903.05734 · Cited by 39
“it has extensively been used in related work [6, 22, 37, 40, 58, 69].”
BackgroundMethodInfluentialDoes BLEU Score Work for Code Migration?
Tran, N., Tran, H., Nguyen, S., Nguyen, H., & Nguyen, T. (2019) · 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2019.00034 · Cited by 49
“[54] improve n-gram model with caching capability for recently seen tokens to increase next-token prediction accuracy.”
MethodBuilding Language Models for Text with Named Entities
Parvez, M. R., Chakraborty, S., Ray, B., & Chang, K.-W. (2018) · Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p18-1221 · Cited by 36
“This property is successfully captured by cache based language models (Hellendoorn and Devanbu, 2017; Tu et al., 2014).”
Learning to Generate Corrective Patches using Neural Machine TranslationPreprint
Hata, H., Shihab, E., & Neubig, G. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1812.07170 · Cited by 65
“[133] Token n-gram (cache) Code completion Snapshot (Java and Python)”
CACHECA: A Cache Language Model Based Code Suggestion Tool
Franks, C., Tu, Z., Dévanbu, P., & Hellendoorn, V. J. (2015) · Cited by 34
Self-citationStochastic Optimization of Program Obfuscation
Liu, H., Sun, C. P., Su, Z., Jiang, Y., Gu, M., & Sun, J. (2017) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse.2017.28 · Cited by 42
“Moreover, the localness is further enriched by Tu via proposing a cache language model to absorb local constructs for predicting programs [15].”
BackgroundMethodInfluentialSelf-citationCodeGRU: Context-aware deep learning with gated recurrent unit for source code modeling
Hussain, Y., Huang, Z., Zhou, Y., & Wang, S. (2020) · Information and Software Technology · doi:10.1016/j.infsof.2020.106309 · Cited by 43
Exploring API method parameter recommendations
Asaduzzaman, M., Roy, C. K., Monir, S., & Schneider, K. A. (2015) · IEEE International Conference on Software Maintenance (ICSM) · doi:10.1109/icsm.2015.7332473 · Cited by 35
HiRec: API Recommendation using Hierarchical Context
Xie, R., Kong, X., Wang, L., Zhou, Y., & Li, B. (2019) · Proceedings/Proceedings - International Symposium on Software Reliability Engineering · doi:10.1109/issre.2019.00044 · Cited by 37
“The usage pattern of projectspecific code is not clear because of the lack of historical data [38].”
BackgroundMethodStudying the difference between natural and programming language corpora
Casalnuovo, C., Sagae, K., & Devanbu, P. (2019) · Empirical Software Engineering · doi:10.1007/s10664-018-9669-7 · Cited by 33
“For natural language, the cache has no effect in English, as previously reported (Tu et al, 2014).”
BackgroundMethodResultInfluentialKoç, U., Wei, S., Foster, J. S., Carpuat, M. J., & Porter, A. (2019) · IEEE International Conference on Software Testing, Verification and Validation (ICST) · doi:10.1109/icst.2019.00036 · Cited by 47
“Multiple researchers have successfully applied NLP techniques to programs to tackle SE problems such as clone detection [66], API mining [12], [19], variable naming and renaming [1], [51], code suggestion and completion [46], [52], [62], bug detection [3].”
MethodDiversity-driven automated formal verification
First, E., & Brun, Y. (2022) · Proceedings of the 44th International Conference on Software Engineering · doi:10.1145/3510003.3510138 · Cited by 33
“Modified n-grams can be used as a cache to capture local dependencies in code [81].”
MethodCombining Program Analysis and Statistical Language Model for Code Statement Completion
Nguyen, S., Nguyen, T. N., Li, Y., & Wang, S. (2019) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2019.00072 · Cited by 37
“veness and efficiency, we set the maximum number of tokens in a statement of 12. B. Evaluation Setup, Procedure, and Metrics We used the same setting with data across projects as in existing work [9], [25], [20]. That is, we divided the source cross-validation: each fold was chosen for testing, while the remaining fold…”
BackgroundMethodInfluentialContext-Aware Cross-Attention for Non-Autoregressive Translation
Ding, L., Wang, L., Wu, D., Tao, D., & Tu, Z. (2020) · International Conference on Computational Linguistics · doi:10.18653/v1/2020.coling-main.389 · Cited by 45
Self-citationNIRMAL: Automatic identification of software relevant tweets leveraging language model
Sharma, A. B., Tian, Y., & Lo, D. (2015) · IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER) · doi:10.1109/saner.2015.7081855 · Cited by 36
“Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/ republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component…”
BackgroundCACHECA: A Cache Language Model Based Code Suggestion Tool
Franks, C., Tu, Z., Devanbu, P., & Hellendoorn, V. (2015) · 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering · doi:10.1109/icse.2015.228 · Cited by 30
Self-citationGenerating Java Methods: An Empirical Assessment of Four AI-Based Code Assistants
Corso, V., Mariani, L., Micucci, D., & Riganelli, O. (2024) · IEEE International Conference on Program Comprehension (ICPC) · doi:10.1145/3643916.3644402 · Cited by 54
Perceived language complexity in GitHub issue discussions and their effect on issue resolution
Kavaler, D., Sirovica, S., Hellendoorn, V. J., Aranovich, R., & Filkov, V. (2017) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2017.8115620 · Cited by 37
“al [45] on a combination of the Brown and Gutenberg corpora11.”
BackgroundDeep API LearningPreprint
Gu, X., Zhang, H., Zhang, D., & Kim, S. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1605.08535 · Cited by 56
ANNE: Improving Source Code Search using Entity Retrieval Approach
Vinayakarao, V., Sarma, A., Purandare, R., Jain, S., & Jain, S. (2017) · ACM International Conference on Web Search and Data Mining (WSDM) · doi:10.1145/3018661.3018691 · Cited by 29
“Tu et al. [32] find that source code exhibits redundancies even in local context i.e., in short snippet of code being edited by a developer.”
BackgroundCross-Entropy: A New Metric for Software Defect Prediction
Zhang, X., Ben, K., & Zeng, J. (2018) · IEEE International Conference on Software Quality, Reliability and Security (QRS) · doi:10.1109/qrs.2018.00025 · Cited by 32
“From the perspective of natural language processing (NLP), a series of research has been conducted to study the statistical properties of code [2][4][17][26][46].”
BackgroundA unified multi-task learning model for AST-level and token-level code completion
Liu, F., Li, G., Wei, B., Xia, X., Fu, Z., & Jin, Z. G. (2022) · Empirical Software Engineering · doi:10.1007/s10664-022-10140-7 · Cited by 37
“Accuracy is a classical evaluation measures for code completion and have been used in many the previous code completion work (Hindle et al. 2012; Tu et al. 2014; Raychev et al. 2016; Hellendoorn and Devanbu 2017; Li et al. 2018; Karampatsis et al. 2020).”
BackgroundMethodInfluentialPassport: Improving Automated Formal Verification Using Identifiers
Sanchez-Stern, A., First, E., Zhou, T., Kaufman, Z., Brun, Y., & Ringer, T. (2023) · ACM Transactions on Programming Languages and Systems · doi:10.1145/3593374 · Cited by 51
“…found higher degrees of locality than in other programming languages, suggesting that cache-based approaches already helpful in neural program synthesis [Tu et al. 2014] (especially when used in combination with BPE [Karampatsis et al. 2020]) may prove particularly useful for synthesizing proofs.”
BackgroundResultDeep Transfer Learning for Source Code Modeling
Hussain, Y., Huang, Z., Zhou, Y., & Wang, S. (2020) · International Journal of Software Engineering and Knowledge Engineering · doi:10.1142/s0218194020500230 · Cited by 28
Ciniselli, M., Pascarella, L., & Bavota, G. (2022) · Proceedings of the 19th International Conference on Mining Software Repositories · doi:10.1145/3524842.3528440 · Cited by 26
“The usage of data-driven techniques for code recommendation has its roots in the works exploiting statistical language models, such as n-gram models, to recommend developer with the next code token to write [20, 24, 55].”
MethodCHRONOS: Time-Aware Zero-Shot Identification of Libraries from Vulnerability Reports
Lyu, Y., Le-Cong, T., Kang, H. J., Widyasari, R., Zhao, Z., Le, X.-B. D., Li, M., & Lo, D. (2023) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1109/icse48619.2023.00094 · Cited by 30
“Caches of identifier names have been used to improve language models for source code [64]–[66].”
MethodAn Accurate Identifier Renaming Prediction and Suggestion Approach
Zhang, J., Luo, J., Liang, J., Gong, L., & Huang, Z. (2023) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3603109 · Cited by 24
“Flawed identifiers usually cause serious software development problems, including triggering software bugs and increasing software maintenance costs [38, 59].”
BackgroundLearning from Examples to Find Fully Qualified Names of API Elements in Code Snippets
Saifullah, C. M. K., Asaduzzaman, M., & Roy, C. K. (2019) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2019.00032 · Cited by 32
“Local context captures the naturalness [17] and local-ness [18] properties of the code.”
BackgroundModeling programs hierarchically with stack-augmented LSTM
Liu, F., Zhang, L., & Jin, Z. G. (2020) · Journal of Systems and Software · doi:10.1016/j.jss.2020.110547 · Cited by 27
“However, in most of the current source code modeling approaches [14, 36, 24, 7, 23], programs are represented as flatten sequences, for example, token sequences or AST node sequences.”
BackgroundMethodInfluentialGenerative API usage code recommendation with parameter concretization
Chen, C., Peng, X., Sun, J., Xing, Z., Wang, X., Zhao, Y., Zhang, H., & Zhao, W. (2019) · Science China Information Sciences · doi:10.1007/s11432-018-9821-9 · Cited by 23
Non-Autoregressive Line-Level Code Completion
Liu, F., Fu, Z., Li, G., Jin, Z., Liu, H., Hao, Y., & Zhang, L. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3649594 · Cited by 22
“Various Language Models (LM) have been employed for code completion, including N-gram [20, 46], RNN [22, 26], and Transformer based models [13, 27, 51] to predict a single token at a time.”
MethodModeling Vocabulary for Big Code Machine LearningPreprint
Babii, H., Janes, A., & Robbes, R. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1904.01873 · Cited by 24
“or programs using APIs. They then learn a probabilistic model from existing data and use it to predict properties (e.g., variable names or type annotations) of unseen programs et al. [59] . Tu et al. [66] introduce a cache language model that consists of an n-gram and an added "cache" component to exploit lo…”
BackgroundMethodLearning API Usages from Bytecode: A Statistical ApproachPreprint
Nguyen, T. T., Pham, H. V., Vu, P. M., & Nguyen, T. T. (2015) · arXiv (Cornell University) · doi:10.48550/arxiv.1507.07306 · Cited by 24
“al [39] 3-gram (cache) Lexical token Source code 9 (Java) + 9 (Python) projects 10-fold cross validation Hindle et.”
BackgroundLMDet: A “Naturalness” Statistical Method for Hardware Trojan Detection
Shen, H., Tan, H., Li, H., Zhang, F., & Li, X. (2017) · IEEE Transactions on Very Large Scale Integration (VLSI) Systems · doi:10.1109/tvlsi.2017.2781423 · Cited by 24
“Statistical language modeling has been used to model the regularities in natural and programming languages, and to solve practical problems such as software bug detection [7], fault localization [8], coding style checking [9], and others [10], [11].”
MethodTree2Tree Neural Translation Model for Learning Source Code Changes.Preprint
Chakraborty, S., Allamanis, M., & Ray, B. (2018) · arXiv (Cornell University) · Cited by 27
Guo, H., Chen, Y., Chen, X., Huang, Y., & Zheng, Z. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3637229 · Cited by 33
“Code entropy refers to an indicator of statistical code distribution, which is proposed by References [56, 61].”
BackgroundA Simple, Efficient, Context‐sensitive Approach for Code Completion
Asaduzzaman, M., Roy, C. K., Schneider, K. A., & Hou, D. (2016) · Journal of Software Evolution and Process · doi:10.1002/smr.1791 · Cited by 25
“Tu et al. develop a language model (known as Cache LM) that uses a cache component to capture the localness of software [10].”
Method
Metadata
- Authors
- Tu, Z., Su, Z., & Devanbu, P.
- Affiliations
- University of California, Davis (US)
- University of California at Davis, USA
- Venue
- Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering
- Publisher
- ACM
- Published
- 2014-11-11
- Pages
- 269-280
- OpenAlex
- W2165747537
- Cited by
- 238
- References
- 52
- Citations by year
- 2026: 4 · 2025: 14 · 2024: 16 · 2023: 21 · 2022: 16 · 2021: 27 · 2020: 33 · 2019: 29 · 2018: 26 · 2017: 9 · 2016: 23 · 2015: 20
- FWCI
- 14.79
- Type
- conference paper
- Language
- en
- Open access
- closed
- Locations
- ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) (publishedVersion)
- Funders
- National Science Foundation
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Keywords
- n-gram language models, source code, localness, code completion, lexicalization, cross-entropy
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.