RAMBO: Enhancing RAG-based Repository-Level Method Body Completion
Not on the map. Why?
Abstract (arXiv)
Code completion is essential in software development, helping developers by predicting code snippets based on context. Among completion tasks, Method Body Completion (MBC) is particularly challenging as it involves generating complete method bodies based on their signatures and context. This task becomes significantly harder in large repositories, where method bodies must integrate repositoryspecific elements such as custom APIs, inter-module dependencies, and project-specific conventions. In this paper, we introduce RAMBO, a novel RAG-based approach for repository-level MBC. Instead of retrieving similar method bodies, RAMBO identifies essential repository-specific elements, such as classes, methods, and variables/fields, and their relevant usages. By incorporating these elements and their relevant usages into the code generation process, RAMBO ensures more accurate and contextually relevant method bodies. Our experimental results with leading code LLMs across 40 Java projects show that RAMBO significantly outperformed the state-of-the-art repository-level MBC approaches, with the improvements of up to 46% in BLEU, 57% in CodeBLEU, 36% in Compilation Rate, and up to 3X in Exact Match. Notably, RAMBO surpassed RepoCoder Oracle method by up to 12% in Exact Match, setting a new benchmark for repository-level MBC.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 43 of its 76 references that are in the map. First posted on arXiv 23 Sep 2024.
Builds on
43 of 76 references.
References · 43
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
31 more
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 151
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2024Bugs in Large Language Models Generated Code: An Empirical Studycited by 59
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2022When Language Model Meets Private Librarycited by 54
- 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
- 2019Does BLEU Score Work for Code Migration?cited by 49
- 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 49
- 2024RLCoder: Reinforcement Learning for Repository-Level Code Completioncited by 44
- 2018Retrieval-Based Neural Code Generationcited by 41
- 2022Fill in the Blank: Context-aware Automated Text Input Generation for Mobile GUI Testingcited by 36
- 2022StructCoder: Structure-Aware Transformer for Code Generationcited by 33
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2023Domain Adaptive Code Completion via Language Models and Decoupled Domain Databasescited by 19
- 2024ComplexCodeEval: A Benchmark for Evaluating Large Code Models on More Complex Codecited by 18
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15
- 2024CoderUJB: An Executable and Unified Java Benchmark for Practical Programming Scenarioscited by 11
- 2023Multilingual Code Co-Evolution Using Large Language Modelscited by 9
- 2023Code-centric Learning-based Just-In-Time Vulnerability Detectioncited by 8
- 2024An Empirical Study on Capability of Large Language Models in Understanding Code Semanticscited by 7
- 2021Improving Code Autocompletion with Transfer Learningcited by 6
- 2019Combining Program Analysis and Statistical Language Model for Code Statement Completioncited by 5
- 2023ARIST: An Effective API Argument Recommendation Approachcited by 2
- 2023VFFINDER: A Graph-based Approach for Automated Silent Vulnerability-Fix Identificationcited by 2
- 2024Automated Description Generation for Software Patchescited by 1
Built on by
Citing papers per year: 2024: 1; 2025: 8; 2026: 1.
10 papers.
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?cited by 6
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generationcited by 5
- 2025Boosting Open-Source LLMs for Program Repair via Reasoning Transfer and LLM-Guided Reinforcement Learningcited by 2
- 2025From Context to Intent: Reasoning-Guided Function-Level Code Completioncited by 1
- 2025Beyond Function-Level Search: Repository-Aware Dual-Encoder Code Retrieval with Adversarial Verificationcited by 1
- 2025CABENCH: Benchmarking Composable AI for Solving Complex Tasks through Composing Ready-to-Use Modelscited by 0
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2025Beyond Function-Level Search: Repository-Aware Dual-Encoder Code Retrieval with Adversarial Verification16 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025From Context to Intent: Reasoning-Guided Function-Level Code Completion13 Aug 2025
- 2025CABENCH: Benchmarking Composable AI for Solving Complex Tasks through Composing Ready-to-Use Models4 Aug 2025
- 2025Boosting Open-Source LLMs for Program Repair via Reasoning Transfer and LLM-Guided Reinforcement Learning4 Jun 2025
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generation7 May 2025
- 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond26 Mar 2025
- 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representations22 Jan 2025
- 2024Does Few-Shot Learning Help LLM Performance in Code Synthesis?3 Dec 2024
Similar, not cited
Close in wording, no citation either way
- 2024STALL+: Boosting LLM-based Repository-level Code Completion with Static Analysis
- 2025A Deep Dive into Retrieval-Augmented Generation for Code Completion: Experience on WeChat
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
- 2024A Lightweight Framework for Adaptive Retrieval In Code Completion With Critique Model
- 2026In Line with Context: Repository-Level Code Generation via Context Inlining
- 2024Class-Level Code Generation from Natural Language Using Iterative, Tool-Enhanced Reasoning over Repository
- 2024A RAG Method for Source Code Inquiry Tailored to Long-Context LLMs