ReACC: A Retrieval-Augmented Code Completion Framework
Open accessAbstract
Code completion, which aims to predict the following code token(s) according to the code context, can improve the productivity of software development. Recent work has proved that statistical language modeling with transformers can greatly improve the performance in the code completion task via learning from large-scale source code datasets. However, current approaches focus only on code context within the file or project, i.e. internal context. Our distinction is utilizing "external" context, inspired by human behaviors of copying from the related code snippets when writing code. Specifically, we propose a retrieval-augmented code completion framework, leveraging both lexical copying and referring to code with similar semantics by retrieval. We adopt a stage-wise training approach that combines a source code retriever and an auto-regressive language model for programming language. We evaluate our approach in the code completion task in Python and Java programming languages, achieving a state-of-the-art performance on CodeXGLUE benchmark.
AI snapshot
Written from the paper’s full text.
TL;DR
ReACC is a retrieval-augmented code completion framework that retrieves lexically and semantically similar code from an external codebase and concatenates it with the unfinished code for a CodeGPT-adapted generator. It reports state-of-the-art performance on the CodeXGLUE code completion benchmark for Python and Java.
Key findings
- On CodeXGLUE, ReACC-hybrid achieves PY150 perplexity 2.311, exact match 46.26, edit similarity 74.41; Java Corpus perplexity 3.327, exact match 30.70, edit similarity 64.73 (Table 3).
- On a newly created PY150 test set, ReACC-hybrid reaches exact match 40.15 and edit similarity 72.01, compared with CodeGPT-adapted 38.77/70.07 and X-CodeGPT 39.41/70.97 (Table 4).
- On CodeNet Python algorithm-domain completion, ReACC-hybrid reaches exact match 64.74 and edit similarity 84.93 vs CodeGPT-adapted 46.38/74.10; the paper reports 10% and 18% absolute improvement in edit similarity and exact match, respectively (Table 5).
- In zero-shot code clone detection on CodeNet, ReACC-retriever gets Python MAP@100 9.60 / precision 27.04 and Java 9.31 / 27.55; BM25 gets Python 10.32/23.17 and Java 8.67/25.85 (Table 2). Ablation shows query truncation is the most essential factor, and identifier renaming contributes more than dead code insertion (Table 6).
Methods
- ReACC combines a hybrid retriever (BM25 sparse + dense dual-encoder initialized from GraphCodeBERT, contrastively pretrained with in-batch negatives, data augmentation via identifier renaming and dead-code insertion, API sequence input, random query truncation) and a CodeGPT-adapted decoder-only generator; the retrieved next fragment \(c'_s\) is concatenated with context \(x\).
- Retriever pretraining uses CodeSearchNet: 1.6M Java methods and 1.2M Python functions. Evaluation uses CodeXGLUE PY150 and GitHub Java Corpus for completion, and CodeNet for zero-shot clone detection; the completion retrieval database is the training set of PY150/Java Corpus.
- Metrics: token-level perplexity; line-level exact match and edit similarity; clone detection MAP@K and precision at 1. Hybrid score is \(\text{sim}(q,c) + \alpha \cdot \text{BM25}(q,c)\) with \(\alpha = 0.9\).
Limitations
- Paper states the Java Corpus retrieval database is much smaller (12,934 training files), making retrieval harder and improvements smaller than on PY150.
- Paper states that for token-level completion, retrieval is not applied at each step; it retrieves after predicting the first 100 tokens for efficiency.
- Evident from the text: evaluation is limited to Python and Java; the GitHub Copilot comparison is qualitative examples only, not a systematic benchmark; the dense retriever relies on semantic-preserving transformations for positives because labeled similar-code pairs are rare.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
3 of 12 cited sources checked · 0 supported · 0 flagged · accuracy not yet measured
- Premisecitation§ Abstract
Current code completion approaches focus only on code context within the file or project (internal context).
“However, current approaches focus only on code context within the file or project, i.e. internal context.”
Quote in the paperSubstantial claim2 of 2 sources checked- cites Liu et al., 2020 source
The Introduction (page unavailable) describes existing completion models as using source-code sequences and considering tokens in the source-code file. It does not establish that current approaches use *only* context within the file or project, or define that scope as “internal context.” (LLM, conf=0.78)
Experimental — accuracy not yet measured - cites Clement et al., 2021 source
Section 2 describes code completion using context from the source file, and Section 5.2 contrasts a method-completion approach using only the focal method with one using file-level context. These passages support the use of internal context in the approaches discussed, but they do not establish that current code-completion approaches use only file- or project-internal context. (LLM, conf=0.79)
Experimental — accuracy not yet measured
- Findingown data§ 5.4 Results
Among the three retriever configurations in ReACC, the hybrid retriever performs best on almost all metrics except exact match on the new PY150 test set.
“Among three configurations of the retriever in ReACC, hybrid retriever performs best on almost all metrics except the exact match score in the new test set of PY150.”
Quote in the paperNot a substantial claim - Findingown data§ 5.5 Analysis
When fragment alignment is removed from the generator, performance suffers slightly.
“When fragment alignment is removed from generator, i.e. using the retrieved code snippet itself for generator, performance suffers slightly.”
Quote in the paperNot a substantial claim - Findingown data§ 5.5 Analysis
Comparing the two semantic-preserving transformations, identifier renaming contributes more than dead code insertion.
“Comparing the two semanticpreserving transformations, identifier renaming contributes more than dead code insertion.”
Quote in the paperNot a substantial claim - Findingown data§ Abstract
ReACC achieves state-of-the-art performance on the CodeXGLUE benchmark.
“achieving a state-of-the-art performance on CodeXGLUE benchmark.”
Quote in the paperSubstantial claim
- Findingown data§ 4.4 Results
ReACC-retriever significantly outperforms CodeBERT and GraphCodeBERT in zero-shot code clone detection on CodeNet.
“While our model significantly outperforms them”
Quote in the paperSubstantial claim - Findingown data§ 4.4 Results
CodeBERT and GraphCodeBERT can hardly retrieve equivalent code in zero-shot code clone detection on CodeNet.
“From the comparison with other transformer-based encoders, we can see CodeBERT and GraphCodeBERT can hardly retrieve equivalent code.”
Quote in the paperSubstantial claim - Findingown data§ 5.5 Analysis
The most essential factor among the ablated factors is query truncation.
“The most essential factor among them is query truncation.”
Quote in the paperNot a substantial claim - Findingreasoning§ 4.4 Results
BM25 performs splendidly in zero-shot code clone detection on CodeNet.
“We also find that BM25 performs splendidly in this task”
Quote in the paperSubstantial claim - Findingown data§ 1 Introduction
ReACC achieves state-of-the-art performance on the CodeNet dataset.
“ReACC achieves a state-of-the-art performance on both datasets.”
Quote in the paperSubstantial claim - Findingown data§ 5.5 Analysis
When data augmentation and training strategies in retriever or generator are eliminated, the metrics degrade.
“As seen in Table 6, when data argumentation and training strategies in retriever or generator are eliminated, the metrics degrade.”
Quote in the paperSubstantial claim - Findingreasoning§ 5.5 Analysis
ReACC with dense retriever outperforms BM25 significantly on CodeNet.
“We also notice that ReACC with dense retriever outperforms BM25significantly in CodeNet.”
Quote in the paperSubstantial claim - Findingreasoning§ 5.5 Analysis
Copilot can benefit from ReACC when it takes advantage of ReACC's retriever.
“And in 6 Copilot itself can benefit from ReACC when it takes advantage of ReACC's retriever”
Quote in the paperNot a substantial claim - Findingnone given§ 5.5 Analysis
In some cases, ReACC with CodeGPT as the generator outperforms Copilot.
“However, in some cases, ReACC with CodeGPT as the generator outperforms Copilot.”
Quote in the paperNot a substantial claim - Interpretationown data§ 4.4 Results
ReACC-retriever is capable of retrieving semantically equivalent code even when the query's semantics is incomplete.
“which indicts our model is capable of retrieving the semantically equivalent code even when the query's semantics is incomplete.”
Quote in the paperSubstantial claim - Premisecitation§ 1 Introduction
Programmers tend to reuse existing code snippets by copying part of code with or without minor modifications to accelerate software development.
“programmers tend to reuse an existing code snippet by copying part of code with or without minor modifications to accelerate software development (Roy and Cordy, 2008; Baker, 2007)”
Quote in the paperSubstantial claim0 of 2 sources checked - Interpretationown data§ 5.4 Results
The code completion task can benefit from both semantically and lexically similar codes.
“The findings indict that the code completion task can benefit from both semantically and lexically similar codes.”
Quote in the paperSubstantial claim - Premisecitation§ 3.2 Retriever
API usage sequence is highly related to the functionality of a code snippet.
“API usage sequence is highly related to the functionality of a code snippet (Gu et al., 2016; Hu et al., 2018).”
Quote in the paperSubstantial claim0 of 2 sources checked- cites Gu et al., 2016
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- cites Hu et al., 2018
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- Interpretationreasoning§ 5.5 Analysis
In the algorithm domain, semantically similar code may be more valuable for code completion than lexically similar code.
“It can be explained by the fact that in algorithm domain, semantically similar code may be more valuable than for code completion lexically similar code.”
Quote in the paperSubstantial claim- Rests on an assumption: The CodeNet dataset can be considered in the algorithm domain.
- Interpretationown data§ 1 Introduction
External source code retrieved by the retriever is useful for auto-completing partial code.
“The experimental results demonstrate that external source code retrieved by our retriever is useful for auto-completing the partial code.”
Quote in the paperSubstantial claim - Interpretationown data§ 4.4 Results
Semantically related codes are likely to be lexically similar.
“The findings suggest that semantically related codes are likely to be lexically similar”
Quote in the paperSubstantial claim - Interpretationown data§ 5.4 Results
Utilizing 'external' context is beneficial to the code completion task.
“which proves our conjection that the 'external' context is beneficial to the code completion task.”
Quote in the paperSubstantial claim - Interpretationreasoning§ 4.4 Results
Code-to-code search is easier than text-to-code or question-to-passage search using term-based retrieval.
“making code-to-code search easier than text-to-code or question-to-passage search using the term-based retrieval method.”
Quote in the paperSubstantial claim - Interpretationown data§ 5.4 Results
Utilizing 'external' context can be more useful than making the most of the current code file.
“The comparison with X-CodeGPT in Table 4 demonstrates that utilizing 'external' context could be more useful than making the most of the current code file.”
Quote in the paperSubstantial claim - Interpretationreasoning§ 4.4 Results
Lexical similarity contributes more for retrieval in code-to-code search.
“which leads lexical similar to contribute more for retrieval”
Quote in the paperSubstantial claim - Interpretationreasoning§ 5.4 Results
The Java retrieval database is much smaller (12,934 training files), making retrieval of similar code from it more difficult.
“The reason for this is that the retrieval database for Java (i.e., the training set) is much smaller. The CodeXGLUE Java Corpus dataset contains only 12,934 files for training so that it's more difficult to retrieve similar code from them.”
Quote in the paperSubstantial claim - Interpretationreasoning§ 5.5 Analysis
Retrieval-augmented method is effective for strong generative models.
“which indicates the effectiveness of retrieval-augmented method for strong generative models.”
Quote in the paperSubstantial claim
- Classified as probably not a substantial claim. 13
- May combine two claims. 8
- The quote only partly states this claim. 2
Probably not a substantial claim: may not pass S3 (load-bearing). May combine two claims.
Premisecitation§ 5.5 AnalysisCodex is more powerful than CodeGPT because it is a large-scale pretrained model trained on all source codes in GitHub based on GPT-3.
“It worth noting that Codex is more powerful than CodeGPT since it is a large-scale pretrained model that is trained on all source codes in GitHub based on GPT-3 (Brown et al., 2020).”
Quote in the paperNot a substantial claim1 of 1 sources checked- cites Brown et al., 2020 source
Section 2.1 (p. 8) describes GPT-3 as a large model, but does not identify Codex as a GPT-3-based model. Searches for Codex, CodeGPT, and GitHub source-code training found no passage addressing their comparison or Codex’s training data. The claim therefore cannot be verified from this paper. (LLM, conf=0.76)
Experimental — accuracy not yet measured
May combine two claims.
Findingown data§ 5.4 ResultsBM25 shows comparable results with dense retriever and even performs better in perplexity and exact match metrics.
“Another finding is that BM25 shows comparable results with dense retriever and even performs better in perplexity and exact match metrics.”
Quote in the paperNot a substantial claimMay combine two claims.
Findingown data§ 5.5 AnalysisReACC significantly outperforms CodeGPT-adapted on the CodeNet Python dataset by 10% absolute improvement in edit similarity and 18% absolute improvement in exact match.
“Table 5 reveals that ReACC significantly outperforms CodeGPTadapted in CodeNet by 10% and 18% absolute improvement in edit similarity and exact match, respectively.”
Quote in the paperSubstantial claimMay combine two claims. The quote only partly states this claim.
Findingown data§ 5.4 ResultsReACC (with hybrid retriever) outperforms other baselines and achieves state-of-the-art performance on the CodeXGLUE code completion benchmark.
“ReACC framework with the hybrid retriever outperforms consistently than other baselines on all datasets”
- Also stated in: § 6 Conclusion · plain
“On the CodeXGLUE benchmark, ReACC achieves a state-of-the-art performance in the code completion task.”
Quote in the paperSubstantial claim- Also stated in: § 6 Conclusion · plain
May combine two claims.
Interpretationnone given§ 2.2 Retrieval on code intelligenceIn the code completion scenario, using code as query, particularly partial code, is a more difficult task because there are few labeled data with semantically similar code pairs and semantics in query is incomplete.
“In the code completion scenario, however, we focus on using code as query, particularly partial code, which is a more difficult task since there are few labeled data with semantically similar code pairs and in partial code search, semantics in query is incomplete.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S4 (based).
Premisenone given§ 1 IntroductionThe cross-encoder model has high computational complexity.
“since the cross-encoder model has a high computational complexity.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S4 (based).
Premisenone given§ 1 IntroductionThe dense retriever can capture syntactic and semantic information by mapping a code snippet to a dense vector.
“The dense retriever, on the contrary, can capture syntactic and semantic information by mapping a code snippet to a dense vector.”
Quote in the paperNot a substantial claimMay combine two claims.
Premisereasoning§ 1 IntroductionThe sparse retriever can capture lexical information and is sensitive to the names of code identifiers.
“The sparse retriever can capture lexical information and is sensitive to the names of code identifiers.”
Quote in the paperSubstantial claimMay combine two claims.
Premisecitation§ 3.2 RetrieverSearching semantically equivalent code requires extra code compilation and execution costs, which is unrealistic in a large database.
“Searching semantically equivalent code requires extra code compilation and execution costs (Massalin, 1987; Churchill et al., 2019), which is unrealistic in a large database.”
Quote in the paperSubstantial claim0 of 2 sources checkedClassified as probably not a substantial claim.
Premisecitation§ 1 IntroductionA software repository usually contains 7-23% cloned codes.
“leading a software repository usually containing 7-23% cloned codes (Svajlenko and Roy, 2015).”
Quote in the paperSubstantial claim0 of 1 sources checked- cites Svajlenko and Roy, 2015 source
Probably not a substantial claim: may not pass S4 (based).
Premisenone given§ 1 IntroductionThe labeled data containing similar code pairs is rare.
“As the labeled data containing similar code pairs is rare”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S4 (based).
Study design and conductreasoning§ 4.3 Experiment SetupThe code clone detection experiment is implemented in partial search way, which is ideally adapted to code completion scenarios.
“We implement the code clone detection experiment in the partial search way, which is ideally adapted to code completion scenarios as it accepts a partial program as a query while maintaining the same goal.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S3 (load-bearing).
Premisecitation§ 3.2 RetrieverDead code insertion is one of the most common techniques for code obfuscation.
“Dead code insertion is one of the most common techniques for code obfuscation (You and Yim, 2010)”
Quote in the paperNot a substantial claim0 of 1 sources checked- cites You and Yim, 2010 source
The quote only partly states this claim.
Interpretationown data§ 5.5 AnalysisReACC is more effective in a specific domain (algorithm domain) than in general domains.
“According to the findings, ReACC is more effective in a specific domain.”
Quote in the paperSubstantial claim- Rests on an assumption: PY150 and Java Corpus datasets are extracted from GitHub repositories distributed in a wide domain.
- Rests on an assumption: The CodeNet dataset can be considered in the algorithm domain.
May combine two claims.
Interpretationreasoning§ 3.2 RetrieverBecause programmers tend to copy tokens directly, a code with distinct semantics but substantial lexical similarity can help with code completion.
“Because programmers tend to copy tokens directly, a code with distinct semantics but substantial lexical similarity can help with code completion.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S3 (load-bearing).
Premisecitation§ 3.3 GeneratorCodeGPT-adapted has shown promising results in the code completion task in CodeXGLUE benchmark.
“CodeGPT-adapted has shown promising results in the code completion task in CodeXGLUE benchmark (Lu et al., 2021)”
Quote in the paperNot a substantial claim0 of 1 sources checked- cites Lu et al., 2021
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
Probably not a substantial claim: may not pass S3 (load-bearing).
Study design and conductown data§ 5.3 Experiment SetupThe new dataset built from PY150 retains the train/valid/test split.
“create a new dataset that retains the train/valid/test split, as seen in Table 1.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S3 (load-bearing).
Study design and conductnone given§ 5.3 Experiment SetupExcept for X-CodeGPT, all other baseline models were fine-tuned with the same settings.
“Except for X-CodeGPT, all other baseline models are fine-tuned with the same settings.”
Quote in the paperNot a substantial claimProbably not a substantial claim: may not pass S3 (load-bearing), S4 (based).
Interpretationnone given§ 6 ConclusionOur method can adopt any architecture that can perform code completion as the generator.
“Our method can adopt any architecture that can perform code completion as the generator.”
Quote in the paperNot a substantial claimClassified as probably not a substantial claim.
Study design and conductreasoning§ 5.3 Experiment SetupThe retrieval database for test did not use the contrastive pre-training corpus (CodeSearchNet) to avoid duplication between CodeXGLUE and CodeSearchNet, as both are extracted from GitHub.
“We don't use the contrastive pre-training corpus (i.e., CodeSearchNet) in order to avoid the duplication between CodeXGLUE and CodeSearchNet as they are both extracted from GitHub.”
Quote in the paperSubstantial claim- Rests on an assumption: CodeXGLUE and CodeSearchNet are both extracted from GitHub, so using CodeSearchNet as retrieval database would risk duplication.
Probably not a substantial claim: may not pass S3 (load-bearing).
Study design and conductown data§ 5.3 Experiment SetupThe hybrid retriever's alpha was set to 0.9 based on dev set results for both PY150 and Java Corpus datasets.
“let α = 0 . 9 based on the results on dev set for both PY150 and Java Corpus datasets.”
Quote in the paperNot a substantial claim
The paper relies on this without support.
Identifier names typically convey meanings for humans.
“identifier names typically convey the meanings for humans”
The paper relies on this without support.
PY150 and Java Corpus datasets are extracted from GitHub repositories distributed in a wide domain.
“Both PY150 and Java Corpus datasets are extracted from GitHub repositories which are distributed in a wide domain.”
The paper relies on this without support.
The CodeNet dataset can be considered in the algorithm domain.
“which can be considered in algorithm domain.”
The paper relies on this without support.
CodeXGLUE and CodeSearchNet are both extracted from GitHub, so using CodeSearchNet as retrieval database would risk duplication.
“as they are both extracted from GitHub.”
The paper relies on this without support.
eWASH requires codes parsed into ASTs, but CodeXGLUE codes are tokenized and cannot be parsed.
“Since eWASH requires codes parsed into ASTs but codes in CodeXGLUE have been tokenized and cannot be parsed”
The paper relies on this without support.
Some people frequently write code in more specific domains, such as data mining/pattern recognition or algorithm domains.
“As some people frequently write codes in a more specific domain, e.g., data mining/pattern recognition domain for Kaggle 3 users, algorithm domain for ACM community, etc.”
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404 · cited 2× · see citing works
“And benefiting from the large transformer models (Vaswani et al., 2017) and pre-training techniques (Devlin et al.”
MethodBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 48,293 · cited 2× · see citing works
“And benefiting from the large transformer models (Vaswani et al., 2017) and pre-training techniques (Devlin et al., 2018; Radford et al., 2018), a rapid progress has been made in many code-related tasks like code search (Feng et al., 2020; Guo et al., 2020), code summarization (Clement et al., 2020;…”
BackgroundMethodLanguage Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 2× · see citing works
“As some people frequently write codes in a more specific domain, e.g., data mining/pattern recogni-EM GPT-3 (Brown et al., 2020).”
BackgroundLearning Transferable Visual Models From Natural Language Supervision
Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., Sastry, G., Askell, A., Mishkin, P., Clark, J., et al. (2021) · arXiv · doi:10.48550/arxiv.2103.00020 · Cited by 15,293 · cited 2× · see citing works
“Contrastive learning on code Inspired by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code for better code fragm…”
BackgroundMomentum Contrast for Unsupervised Visual Representation Learning
He, K., Fan, H., Wu, Y., Xie, S., & Girshick, R. (2020) · 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr42600.2020.00975 · Cited by 13,347 · cited 1× · see citing works
“…by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code for better code fragment…”
MethodSentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Reimers, N., & Gurevych, I. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1410 · Cited by 12,778 · cited 1× · see citing works
“Contrastive learning on code Inspired by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code…”
BackgroundExploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., & Liu, P. J. (2019) · arXiv · doi:10.48550/arxiv.1910.10683 · Cited by 10,929 · see citing works
A simple framework for contrastive learning of visual representations
Chen, T., Kornblith, S., Norouzi, M., & Hinton, G. (2020) · arXiv · doi:10.48550/arxiv.2002.05709 · Cited by 10,857 · cited 2× · see citing works
“…on code Inspired by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code for better code…”
BackgroundLewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., & Zettlemoyer, L. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.703 · Cited by 8,821 · cited 5× · see citing works
“Deep neural networks (Liu et al., 2016; Alon et al., 2020; Karampatsis et al., 2020) and pre-training approaches (Liu et al., 2020; Svyatkovskiy et al., 2020) are later frequently utilized to accomplish this.”
BackgroundMethodInfluentialRepresentation Learning with Contrastive Predictive Coding
Oord, A. V. D., Li, Y., & Vinyals, O. (2018) · arXiv · doi:10.48550/arxiv.1807.03748 · Cited by 6,242 · cited 3× · see citing works
“, 2020), we adopt in-batch negatives to calculate the contrastive loss by InfoNCE (Oord et al., 2018):”
MethodDense passage retrieval for open-domain question answering
Karpukhin, V., Oguz, B., Min, S., Lewis, P., Wu, L., Edunov, S., Chen, D., & Yih, W.-T. (2020) · Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.550 · Cited by 3,575 · cited 13× · see citing works
“We also find that BM25 performs splendidly in this task, which is quite different from the performance on other tasks like open-domian QA (Karpukhin et al., 2020), code summarization (Parvez et al.”
BackgroundMethodInfluentialThe probabilistic relevance framework: BM25 and beyond
Robertson, S., & Zaragoza, H. (2009) · Foundations and Trends® in Information Retrieval · doi:10.1561/1500000019 · Cited by 3,374 · cited 2× · see citing works
“The simplest technique for retrieving code is to build a sparse vector retriever like TF-IDF or BM25 (Robertson and Zaragoza, 2009) which are both based on keyword matching algorithms.”
MethodSimCSE: Simple Contrastive Learning of Sentence Embeddings
Gao, T., Yao, X., & Chen, D. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.552 · Cited by 2,851 · cited 1× · see citing works
“…by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code for better code fragment understanding.”
CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · Findings of the Association for Computational Linguistics: EMNLP 2020 · doi:10.18653/v1/2020.findings-emnlp.139 · Cited by 2,824 · cited 7× · see citing works
“…(Devlin et al., 2018; Radford et al., 2018), a rapid progress has been made in many code-related tasks like code search (Feng et al., 2020; Guo et al., 2020), code summarization (Clement et al., 2020; Ahmad et al., 2020), bug fixing (Mashhadi and Hemmati, 2021; Drain et al., 2021) and code…”
BackgroundMethodInfluentialSelf-citationWang, Y., Wang, W., Joty, S., & Hoi, S. C. H. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.685 · Cited by 1,495 · cited 2× · see citing works
“PLBART (Ahmad et al., 2021) is based on BART (Lewis et al., 2020) architecture which employs denoising sequence-to-sequence (Seq2Seq) CodeT5 (Wang et al., 2021) is also an encoder-decoder pre-trained model which adapts T5 (Raf-fel et al., 2019) architecture and considers the identifier-aware token type information in c…”
MethodWang, Y., Wang, W., Joty, S., & Hoi, S. C. H. (2021) · arXiv · doi:10.48550/arxiv.2109.00859 · Cited by 1,495 · see citing works
Evaluating Large Language Models Trained on Code
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021) · arXiv · doi:10.48550/arxiv.2107.03374 · Cited by 1,436 · cited 1× · see citing works
“ReACC vs GitHub Copilot GitHub Copilot4 is a powerful technique for code completion which uses OpenAI Codex (Chen et al., 2021) as the model backend.”
MethodUniXcoder: Unified Cross-Modal Pre-training for Code Representation
Guo, D., Lu, S., Duan, N., et al. (2022) · Annual Meeting of the Association for Computational Linguistics · doi:10.48550/arxiv.2203.03850 · Cited by 1,151 · cited 2×
“C O BERT (Wang et al., 2022) and UniXcoder (Guo et al., 2022) are both pre-training models that utilize multi-modal data, including code, comment, and AST, for better code fragment representation through contrastive learning.”
BackgroundMethodSelf-citationLeveraging Passage Retrieval with Generative Models for Open Domain Question Answering
Izacard, G., & Grave, E. (2021) · Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume · doi:10.18653/v1/2021.eacl-main.74 · Cited by 1,109 · cited 1× · see citing works
“ReACC adopts the stage-wise training strategy which is widely used in other tasks like opendomain question answering (Karpukhin et al., 2020; Izacard and Grave, 2021), natural language to code generation (Hashimoto et al.”
MethodUnified Pre-training for Program Understanding and Generation
Ahmad, W., Chakraborty, S., Ray, B., & Chang, K.-W. (2021) · Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies · doi:10.18653/v1/2021.naacl-main.211 · Cited by 642 · cited 2× · see citing works
“PLBART (Ahmad et al., 2021) is based on BART (Lewis et al., 2020) architecture which employs denoising sequence-to-sequence (Seq2Seq) CodeT5 (Wang et al., 2021) is also an encoder-decoder pre-trained model which adapts T5 (Raf-fel et al., 2019) architecture and considers the identifier-aware token type information in c…”
MethodMalware Obfuscation Techniques: A Brief Survey
You, I., & Yim, K. (2010) · 2010 International Conference on Broadband, Wireless Computing, Communication and Applications · doi:10.1109/bwcca.2010.85 · Cited by 607 · cited 1× · see citing works
“In software engineering, dead code insertion is one of the most common techniques for code obfuscation (You and Yim, 2010), whose goal is to modify a code to make it hard to understand but remain its functionality, which is similar to our goal.”
BackgroundGu, X., Zhang, H., & Kim, S. (2018) · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · doi:10.1145/3180155.3180167 · Cited by 539 · cited 1× · see citing works
“A common scenario for information retrieval in code domain is code search with natural language description as a query (Arwan et al., 2015; Gu et al., 2018; Cambronero et al., 2019).”
BackgroundCodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation
Lu, S., Guo, D., Ren, S., Huang, J., Svyatkovskiy, A., Blanco, A., Clement, C., Drain, D., Jiang, D., Tang, D., et al. (2021) · arXiv · doi:10.48550/arxiv.2102.04664 · Cited by 536 · cited 12× · see citing works
“In our experiments, we adopt CodeGPTadapted (Lu et al., 2021), which is a decoder-only transformer model pre-trained on Python and Java datasets from CodeSearchNet (Husain et al.”
BackgroundMethodInfluentialSelf-citationCodeSearchNet Challenge: Evaluating the State of Semantic Code Search
Husain, H., Wu, H.-H., Gazit, T., Allamanis, M., & Brockschmidt, M. (2019) · arXiv · doi:10.48550/arxiv.1909.09436 · Cited by 483 · cited 8× · see citing works
“However, it is difficult to identify similar programs based on an unlabeled code corpus, e.g., certain widely used datasets (Al-lamanis and Sutton, 2013; Raychev et al., 2016; Husain et al., 2019) mined from GitHub repositories.”
BackgroundMethodInfluentialGu, X., Zhang, H., Zhang, D., & Kim, S. (2016) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/2950290.2950334 · Cited by 483 · cited 1× · see citing works
“API usage sequence is highly related to the functionality of a code snippet (Gu et al., 2016; Hu et al., 2018).”
BackgroundGraphCodeBERT: Pre-training Code Representations with Data Flow
Guo, D., Ren, S., Lu, S., Feng, Z., Tang, D., Liu, S., Zhou, L., Duan, N., Svyatkovskiy, A., Fu, S., et al. (2020) · arXiv · doi:10.48550/arxiv.2009.08366 · Cited by 480 · cited 9× · see citing works
“GraphCodeBERT (Guo et al., 2020) is also pre-trained on CodeSearchNet NL-PL pairs and considers the inherent structure of code i.e. data flow.”
BackgroundMethodInfluentialSelf-citationIntelliCode 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 · cited 3× · see citing works
“, 2020) and pretraining approaches (Liu et al., 2020; Svyatkovskiy et al., 2020) are later frequently utilized to accomplish this.”
BackgroundMethodSelf-citationOn the naturalness of software
Hindle, A., Barr, E. T., Su, Z., Gabel, M., & Devanbu, P. (2012) · 2012 34th International Conference on Software Engineering (ICSE) · doi:10.1109/icse.2012.6227135 · Cited by 425 · cited 3× · see citing works
“With the growth of software engineering field, large-scale source code corpus gives a chance to train language models in code domain (Hindle et al., 2016; Tu et al., 2014).”
MethodA Transformer-based Approach for Source Code Summarization
Ahmad, W. U., Chakraborty, S., Ray, B., & Chang, K.-W. (2020) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2020.acl-main.449 · Cited by 417 · cited 2× · see citing works
“, 2020), code summarization (Clement et al., 2020; Ahmad et al., 2020), bug fixing (Mashhadi and Hemmati, 2021; Drain et al.”
BackgroundMining source code repositories at massive scale using language modeling
Allamanis, M., & Sutton, C. (2013) · IEEE Working Conference on Mining Software Repositories · doi:10.1109/msr.2013.6624029 · Cited by 398 · cited 2× · see citing works
“, 2016) in Python and GitHub Java Corpus dataset (Allamanis and Sutton, 2013) in Java from it for code completion task.”
BackgroundMethodSummarizing Source Code with Transferred API Knowledge
Hu, X., Li, G., Xia, X., Lo, D., Lu, S., & Jin, Z. (2018) · International Joint Conference on Artificial Intelligence · doi:10.24963/ijcai.2018/314 · Cited by 341 · cited 1× · see citing works
“API usage sequence is highly related to the functionality of a code snippet (Gu et al., 2016; Hu et al., 2018).”
BackgroundSelf-citationCompiler techniques for code compaction
Debray, S., Evans, W. S., Muth, R., et al. (2000) · ACM Transactions on Programming Languages and Systems · doi:10.1145/349214.349233 · Cited by 307 · cited 1×
“Dead code is a code snippet which can never be reached (Xi, 1999) or is reachable but whose result can never be used in any other computation (Debray et al., 2000).”
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 · see citing works
Probabilistic model for code with decision trees
Raychev, V., Bielik, P., & Vechev, M. T. (2016) · Conference on Object-Oriented Programming Systems, Languages, and Applications · doi:10.1145/2983990.2984041 · Cited by 294 · cited 3× · see citing works
“We use PY150 dataset (Raychev et al., 2016) in Python and GitHub Java Corpus dataset (Allamanis and Sutton, 2013) in Java from it for code completion task.”
BackgroundMethodCode Completion with Neural Attention and Pointer Networks
Li, J., Wang, Y., Lyu, M. R., & King, I. (2017) · International Joint Conference on Artificial Intelligence · doi:10.24963/ijcai.2018/578 · Cited by 252 · cited 2× · see citing works
“…take the given context only (Liu et al., 2016; Karampatsis et al., 2020), some methods use richer information, e.g., adding code token types (Liu et al., 2020), abstract syntax tree (AST) structures (Li et al., 2018; Kim et al., 2021), or extended hierarchical context (Clement et al., 2021).”
MethodCodeBERT: A Pre-Trained Model for Programming and Natural Languages
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong, M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020) · arXiv · doi:10.48550/arxiv.2002.08155 · Cited by 243 · see citing works
Self-citationTu, Z., Su, Z., & Devanbu, P. (2014) · Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering · doi:10.1145/2635868.2635875 · Cited by 238 · cited 2× · see citing works
“With the growth of software engineering field, large-scale source code corpus gives a chance to train language models in code domain (Hindle et al., 2016; Tu et al., 2014).”
BackgroundMethodWhen deep learning met code search
Cambronero, J., Li, H., Kim, S., Sen, K., & Chandra, S. (2019) · ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE) · doi:10.1145/3338906.3340458 · Cited by 215 · cited 1× · see citing works
“A common scenario for information retrieval in code domain is code search with natural language description as a query (Arwan et al., 2015; Gu et al., 2018; Cambronero et al., 2019).”
BackgroundCode Prediction by Feeding Trees to Transformers
Kim, S., Zhao, J., Tian, Y., & Chandra, S. (2021) · 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE) · doi:10.1109/icse43902.2021.00026 · Cited by 209 · cited 3× · see citing works
“…take the given context only (Liu et al., 2016; Karampatsis et al., 2020), some methods use richer information, e.g., adding code token types (Liu et al., 2020), abstract syntax tree (AST) structures (Li et al., 2018; Kim et al., 2021), or extended hierarchical context (Clement et al., 2021).”
BackgroundMethodUnsupervised Feature Learning via Non-Parametric Instance-level DiscriminationPreprint
Wu, Z., Xiong, Y., Yu, S. X., & Lin, D. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1805.01978 · Cited by 189 · see citing works
Multi-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 · see citing works
Big 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 · cited 4× · see citing works
“Primitive approaches take the given context only (Liu et al., 2016; Karampatsis et al., 2020), some methods use richer information, e.”
BackgroundMethodInfluentialWhat do developers search for on the web?
Xia, X., Bao, L., Lo, D., Kochhar, P. S., Hassan, A. E., & Xing, Z. (2017) · Empirical Software Engineering · doi:10.1007/s10664-017-9514-4 · Cited by 174 · cited 2× · see citing works
“Retrieval for code-related tasks Many code intelligence tasks benefit from information retrieval (Xia et al., 2017).”
BackgroundEvaluating clone detection tools with BigCloneBench
Svajlenko, J., & Roy, C. K. (2015) · 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME) · doi:10.1109/icsm.2015.7332459 · Cited by 172 · cited 1× · see citing works
“This is unnatural from human perspective, as studies demonstrate that programmers tend to reuse an existing code snippet by copying part of code with or without minor modifications to accelerate software development (Roy and Cordy, 2008; Baker, 2007), leading a software repository usually containing 7-23% cloned codes…”
BackgroundSuperoptimizer: a look at the smallest program
Massalin, H. (1987) · Proceedings of the second international conference on Architectual support for programming languages and operating systems · doi:10.1145/36206.36194 · Cited by 154 · cited 1× · see citing works
“Searching semantically equivalent code requires extra code compilation and execution costs (Massalin, 1987; Churchill et al., 2019), which is unrealistic in a large database.”
BackgroundApplying CodeBERT for Automated Program Repair of Java Simple Bugs
Mashhadi, E., & Hemmati, H. (2021) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr52588.2021.00063 · Cited by 144 · cited 1× · see citing works
“, 2020), bug fixing (Mashhadi and Hemmati, 2021; Drain et al., 2021) and code completion (Svyatkovskiy et al.”
BackgroundRetrieval Augmented Code Generation and Summarization
Parvez, M. R., Ahmad, W., Chakraborty, S., Ray, B., & Chang, K.-W. (2021) · Findings of the Association for Computational Linguistics: EMNLP 2021 · doi:10.18653/v1/2021.findings-emnlp.232 · Cited by 141 · cited 4× · see citing works
“, 2020; Izacard and Grave, 2021), natural language to code generation (Hashimoto et al., 2018; Parvez et al., 2021), etc.”
BackgroundMethodInfluentialCERT: Contrastive Self-supervised Learning for Language UnderstandingPreprint
Fang, H., & Xie, P. (2020) · arXiv.org · doi:10.36227/techrxiv.12308378 · Cited by 140 · cited 1× · see citing works
“Contrastive learning on code Inspired by the great success of contrastive learning in other domains (Wu et al., 2018; Reimers and Gurevych, 2019; Fang et al., 2020; Chen et al., 2020; He et al., 2020; Radford et al., 2021; Gao et al., 2021), researchers have deployed this technique to source code…”
BackgroundAroma: code recommendation via structural code search
Luan, S., Yang, D., Barnaby, C., Sen, K., & Chandra, S. (2019) · Proceedings of the ACM on Programming Languages · doi:10.1145/3360578 · Cited by 138 · cited 1× · see citing works
“Luan et al. (2019) pro-pose Aroma, which utilizes code-to-code structural search and intersecting candidate code snippets to recommend relevant code given another code snip-pet as a query.”
BackgroundAn Empirical Study of Function Clones in Open Source Software
Roy, C. K., & Cordy, J. R. (2008) · 2008 15th Working Conference on Reverse Engineering · doi:10.1109/wcre.2008.54 · Cited by 137 · cited 1× · see citing works
“This is unnatural from human perspective, as studies demonstrate that programmers tend to reuse an existing code snippet by copying part of code with or without minor modifications to accelerate software development (Roy and Cordy, 2008; Baker, 2007), leading a software repository usually containing 7-23% cloned codes…”
BackgroundContrastive Code Representation Learning
Jain, P., Jain, A., Zhang, T., Abbeel, P., Gonzalez, J., & Stoica, I. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.482 · Cited by 129 · cited 2× · see citing works
“There exists several attempts to apply such transformation to code (Jain et al., 2020; Rabin et al., 2021; Bui et al., 2021).”
BackgroundContrastive Code Representation Learning
Jain, P., Jain, A., Zhang, T., Abbeel, P., Gonzalez, J. E., & Stoica, I. (2020) · arXiv · doi:10.48550/arxiv.2007.04973 · Cited by 129
A Retrieve-and-Edit Framework for Predicting Structured Outputs
Hashimoto, T. B., Guu, K., Oren, Y., & Liang, P. (2018) · arXiv · doi:10.48550/arxiv.1812.01194 · Cited by 126 · cited 3× · see citing works
“, 2020; Izacard and Grave, 2021), natural language to code generation (Hashimoto et al., 2018; Parvez et al., 2021), etc.”
BackgroundMethodInfluentialPyMT5: multi-mode translation of natural language and Python code with transformers
Clement, C. B., Drain, D., Timcheck, J., Svyatkovskiy, A., & Sundaresan, N. (2020) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.728 · Cited by 123 · cited 3× · see citing works
“, 2020), code summarization (Clement et al., 2020; Ahmad et al., 2020), bug fixing (Mashhadi and Hemmati, 2021; Drain et al.”
BackgroundSelf-citationSynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code RepresentationPreprint
Wang, X. E., Wang, Y., Mi, F., Zhou, P., Wan, Y., Xiao, L., Li, L., Wu, H., Liu, J., & Jiang, X. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2108.04556 · Cited by 118 · cited 8× · see citing works
“The retrieval encoder is initialized with GraphCode-BERT.”
MethodInfluentialBui, N. D. Q., Yu, Y., & Jiang, L. (2021) · Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval · doi:10.1145/3404835.3462840 · Cited by 103 · cited 2× · see citing works
“There exists several attempts to apply such transformation to code (Jain et al., 2020; Rabin et al., 2021; Bui et al., 2021).”
BackgroundRetrieval-Based Neural Code Generation
Hayati, S. A., Olivier, R., Avvaru, P., Yin, P., Tomasic, A., & Neubig, G. (2018) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/d18-1111 · Cited by 98 · cited 1× · see citing works
“As for other code intelligence tasks, Hayati et al. (2018) propose an action subtree retrieval method called ReCode for generating general-purpose code.”
MethodSemantic program alignment for equivalence checking
Churchill, B., Padon, O., Sharma, R., & Aiken, A. (2019) · Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3314221.3314596 · Cited by 97 · cited 2×
“Searching semantically equivalent code requires extra code compilation and execution costs (Massalin, 1987; Churchill et al., 2019), which is unrealistic in a large database.”
BackgroundFast 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 · cited 1× · see citing works
“Svyatkovskiy et al. (2021) and Clement et al. (2021), on the other hand, investigate ways to improve the efficiency and long-range modeling in the code completion task, respectively.”
BackgroundSelf-citationRabin, M. R. I., Bui, N. D. Q., Wang, K., Yu, Y., Jiang, L., & Alipour, M. A. (2021) · Information and Software Technology · doi:10.1016/j.infsof.2021.106552 · Cited by 92 · cited 1× · see citing works
“There exists several attempts to apply such transformation to code (Jain et al., 2020; Rabin et al., 2021; Bui et al., 2021).”
BackgroundCodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Tasks
Puri, R., Kung, D. S., Janssen, G., Zhang, W., Domeniconi, G., Zolotov, V., Dolby, J., Chen, J., Choudhury, M., Decker, L., et al. (2021) · arXiv · doi:10.48550/arxiv.2105.12655 · Cited by 92
Finding Clones with Dup: Analysis of an Experiment
Baker, B. S. (2007) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2007.70720 · Cited by 85 · cited 1× · see citing works
“This is unnatural from human perspective, as studies demonstrate that programmers tend to reuse an existing code snippet by copying part of code with or without minor modifications to accelerate software development (Roy and Cordy, 2008; Baker, 2007), leading a software repository usually containing 7-23% cloned codes…”
BackgroundProbabilistic model for code with decision trees
Raychev, V., Bielik, P., & Vechev, M. (2016) · ACM SIGPLAN Notices · doi:10.1145/3022671.2984041 · Cited by 82 · see citing works
Retrieve and refine: exemplar-based neural comment generation
Wei, B., Li, Y., Li, G., Xia, X., & Jin, Z. (2020) · Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3324884.3416578 · Cited by 69 · see citing works
EditSum: A Retrieve-and-Edit Framework for Source Code Summarization
Li, J., Li, Y., Li, G., Hu, X., Xia, X., & Jin, Z. G. (2021) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase51524.2021.9678724 · Cited by 64 · cited 1× · see citing works
“Both Wei et al. (2020) and Li et al. (2021) leverage the retrieve-and-edit/refine framework to improve model’s performance in code summarization.”
MethodStructural Language Models of CodePreprint
Alon, U. S., Sadaka, R., Levy, O., & Yahav, E. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1910.00577 · Cited by 60 · see citing works
Dead Code Elimination through Dependent Types
Xi, H. (1999) · International Symposium on Practical Aspects of Declarative Languages · doi:10.1007/3-540-49201-1_16 · Cited by 54 · cited 1×
“Dead code is a code snippet which can never be reached (Xi, 1999) or is reachable but whose result can never be used in any other computation (Debray et al.”
BackgroundRetrieve and Refine: Exemplar-Based Neural Comment Generation
Wei, B. (2019) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1109/ase.2019.00152 · Cited by 51 · cited 1× · see citing works
“Both Wei et al. (2020) and Li et al. (2021) leverage the retrieve-and-edit/refine framework to improve model’s performance in code summarization.”
MethodGenerating bug-fixes using pretrained transformers
Drain, D., Wu, C. H., Svyatkovskiy, A., & Sundaresan, N. (2021) · MAPS@PLDI · doi:10.1145/3460945.3464951 · Cited by 49 · cited 2× · see citing works
“, 2020), bug fixing (Mashhadi and Hemmati, 2021; Drain et al., 2021) and code completion (Svyatkovskiy et al.”
BackgroundSelf-citationA Replication Study of Dense Passage RetrieverPreprint
Ma, X., Sun, K., Pradeep, R., & Lin, J. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2104.05740 · Cited by 44 · cited 2× · see citing works
“To that end, we adopt the hybrid retriever (Karpukhin et al., 2020; Ma et al., 2021), which combines results of dense and sparse retriever.”
MethodLearning to Complete Code with Sketches
Guo, D., Svyatkovskiy, A., Yin, J., et al. (2021) · International Conference on Learning Representations · doi:10.48550/arxiv.2106.10158 · Cited by 44 · cited 1×
“Guo et al. (2021) complete codes by generating sketches, i.e. code snip-pets with “holes”.”
BackgroundSelf-citationSimCSE: Simple Contrastive Learning of Sentence EmbeddingsPreprint
Gao, T., Yao, X., & Chen, D. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2104.08821 · Cited by 36 · see citing works
Source code retrieval on StackOverflow using LDA
Arwan, A., Rochimah, S., & Akbar, R. J. (2015) · International Conference on Information and Communicatiaon Technology · doi:10.1109/icoict.2015.7231439 · Cited by 20 · cited 1× · see citing works
“A common scenario for information retrieval in code domain is code search with natural language description as a query (Arwan et al., 2015; Gu et al., 2018; Cambronero et al., 2019).”
BackgroundLong-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchy
Clement, C., Lu, S., Liu, X., Tufano, M., Drain, D., Duan, N., Sundaresan, N., & Svyatkovskiy, A. (2021) · Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2021.emnlp-main.387 · Cited by 12 · cited 11× · see citing works
“X-CodeGPT is a variant of CodeGPT which adapts eWASH (Clement et al., 2021) to CodeGPT.”
BackgroundMethodInfluentialSelf-citationCERT: Contrastive Self-supervised Learning for Language UnderstandingPreprint
Fang, H., Wang, S., Zhou, M., et al. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2005.12766 · Cited by 10 · see citing works
Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax HierarchyPreprint
Clement, C. B., Lu, S., Liu, X., Tufano, M., Drain, D., Duan, N., Sundaresan, N., & Svyatkovskiy, A. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2109.08780 · Cited by 7 · see citing works
Self-citationRetrieval-Based Neural Code GenerationPreprint
Hayati, S. A., Olivier, R., Avvaru, P., et al. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1808.10025 · Cited by 7 · see citing works
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805
Applying CodeBERT for Automated Program Repair of Java Simple Bugs
Mashhadi, E., & Hemmati, H. (2021) · arXiv · doi:10.48550/arxiv.2103.11626
Retrieval Augmented Code Generation and Summarization
Parvez, M. R., Ahmad, W. U., Chakraborty, S., et al. (2021) · arXiv · doi:10.48550/arxiv.2108.11601
Superoptimizer: a look at the smallest program
Massalin, H. (1987) · ACM SIGARCH Computer Architecture News · doi:10.1145/36177.36194
Flagged first, then by citations
Research works printed but not linked: 2
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019. Language models are unsupervised multitask learners. OpenAI blog , 1(8):9.
- Nils Reimers and Iryna Gurevych. 2019. Sentencebert: Sentence embeddings using siamese bertnetworks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) , pages 3982-3992.
Cited by
Sorted by citations
RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation
Zhang, F., Chen, B., Zhang, Y., Keung, J., Liu, J., Zan, D., Mao, Y., Lou, J.-G., & Chen, W. (2023) · Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/2023.emnlp-main.151 · Cited by 173 · see citing works
Large language models for code completion: A systematic literature review
Husein, R. A., Aburajouh, H., & Catal, C. (2025) · Computer Standards & Interfaces · doi:10.1016/j.csi.2024.103917 · Cited by 72 · see citing works
Qwen2.5-Coder Technical Report
Hui, B., Yang, J., Cui, Z., Yang, J., Liu, D., Zhang, L., Liu, T., Zhang, J., Yu, B., Lu, K., et al. (2024) · arXiv · doi:10.48550/arxiv.2409.12186 · Cited by 65 · see citing works
Business insights using RAG–LLMs: a review and case study
Arslan, M., Munawar, S., & Cruz, C. (2024) · Journal of Decision System · doi:10.1080/12460125.2024.2410040 · Cited by 38 · see citing works
Automatic Comment Generation via Multi-Pass Deliberation
Mu, F., Chen, X., Shi, L., Wang, S., & Wang, Q. (2022) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3551349.3556917 · Cited by 14 · see citing works
IRCoCo: Immediate Rewards-Guided Deep Reinforcement Learning for Code Completion
Li, B., Sun, Z., Huang, T., Zhang, H., Wan, Y., Li, G., Jin, Z. G., & Lyu, C. (2024) · Proceedings of the ACM on software engineering. · doi:10.1145/3643735 · Cited by 11 · see citing works
“To tackle exposure bias issue, some studies have attempted to utilize DRL to train code completion models.”
CONCORD: Clone-Aware Contrastive Learning for Source Code
Ding, Y., Chakraborty, S., Buratti, L., Pujar, S., Morari, A., Kaiser, G. E., & Ray, B. (2023) · ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) · doi:10.1145/3597926.3598035 · Cited by 11 · see citing works
“In addition, during contrastive learning, we consider in-batch samples as random negative samples, since we assume that samples inside the same batch do not have similar functionalities.”
BackgroundA Transformer-Based Approach for Smart Invocation of Automatic Code Completion
de Moor, A., van Deursen, A., & Izadi, M. (2024) · Proceedings of the 1st ACM International Conference on AI-Powered Software · doi:10.1145/3664646.3664760 · Cited by 7 · see citing works
DroidCoder: Enhanced Android Code Completion with Context-Enriched Retrieval-Augmented Generation
Yu, X., Li, C., Pan, M., & Li, X. (2024) · IEEE/ACM International Conference on Automated Software Engineering (ASE) · doi:10.1145/3691620.3695063 · Cited by 5 · see citing works
GPT-4 vs. GPT-3.5 AS CODING ASSISTANTSPreprint
Moussiades, L., Zografos, G., & Papakostas, G. A. (2024) · Research Square · doi:10.21203/rs.3.rs-3920214/v1 · Cited by 4 · see citing works
FullStack Bench: Evaluating LLMs as Full Stack Coders
Bytedance-Seed-Foundation-Code-Team, :, Cheng, Y., Chen, J., Chen, J., Chen, L., Chen, L., Chen, W., Chen, Z., Geng, S., et al. (2024) · arXiv · doi:10.48550/arxiv.2412.00535 · Cited by 2 · see citing works
LLM Agents for Verifiable Question Generation and Grading
Levine, J., West, M., & Silva, M. (2025) · Communications in computer and information science · doi:10.1007/978-3-031-99264-3_22
Enhancing code smell classification with code refactoring-based data augmentation
Nizam, A., Aydin, M., İslamoğlu, E., Sahmoud, S., & ÖZAYDIN, Ş. B. (2026) · Knowledge and Information Systems · doi:10.1007/s10115-026-02859-2
A Transformer-Based Approach for Smart Invocation of Automatic Code Completion
de Moor, A., van Deursen, A., & Izadi, M. (2024) · arXiv
- Authors
- Lu, S., Duan, N., Han, H., Guo, D., Hwang, S.-W., & Svyatkovskiy, A.
- Affiliations
- Microsoft Research Asia (China) (CN)
- Seoul National University (KR)
- Microsoft (United States) (US)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2022
- Pages
- 6227-6240
- ISSN
- 0736-587X (ISSN-L)
- arXiv
- 2203.07722
- OpenAlex
- W4226350810
- Cited by
- 96
- References
- 70
- Citations by year
- 2026: 18 · 2025: 35 · 2024: 22 · 2023: 16 · 2022: 5
- FWCI
- 17.43
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- Locations
- Proceedings of the conference - Association for Computational Linguistics. Meeting (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- Seoul National University Open Repository (Seoul National University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- Microsoft Research
- Microsoft Research Asia
- Institute for Information and Communications Technology Promotion
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Keywords
- code completion, retrieval-augmented generation, external context, code search, programming language models, Python, Java, CodeXGLUE
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.
Claims read by deepseek-v4.1-flash under definition version 3 (extract-v3) on 2026-10-10.
Classified by jev-1.13-20260917 (gold-guideline-v0.2) on 2026-10-10.
Cited sources are checked by gpt-6-sol.
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