CATCODER: Repository-Level Code Generation with Relevant Code and Type Context
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated remarkable capabilities in code generation tasks. However, repository-level code generation presents unique challenges, particularly due to the need to utilize information spread across multiple files within a repository. Specifically, successful generation depends on a solid grasp of both general, context-agnostic knowledge and specific, context-dependent knowledge. While LLMs are widely used for the context-agnostic aspect, existing retrieval-based approaches sometimes fall short as they are limited in obtaining a broader and deeper repository context. In this paper, we present CatCoder, a novel code generation framework designed for statically typed programming languages. CatCoder enhances repository-level code generation by integrating relevant code and type context. Specifically, it leverages static analyzers to extract type dependencies and merges this information with retrieved code to create comprehensive prompts for LLMs. To evaluate the effectiveness of CatCoder, we adapt and construct benchmarks that include 199 Java tasks and 90 Rust tasks. The results show that CatCoder outperforms the RepoCoder baseline by up to 14.44% and 17.35%, in terms of compile@k and pass@k scores. In addition, the generalizability of CatCoder is assessed using various LLMs, including both code-specialized models and general-purpose models. Our findings indicate consistent performance improvements across all models, which underlines the practicality of CatCoder. Furthermore, we evaluate the time consumption of CatCoder in a large open source repository, and the results demonstrate the scalability of CatCoder.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 30 of its 70 references that are in the map. First posted on arXiv 5 Jun 2024.
Builds on
30 of 70 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Qwen Technical Reportcited by 3,273
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 973
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
18 more
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023StarCoder: may the source be with you!cited by 790
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 346
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2020Sparse, Dense, and Attentional Representations for Text Retrievalcited by 213
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2020Unit Test Case Generation with Transformers and Focal Contextcited by 118
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2018Mapping Language to Code in Programmatic Contextcited by 104
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2022When Language Model Meets Private Librarycited by 54
- 2024CoderUJB: An Executable and Unified Java Benchmark for Practical Programming Scenarioscited by 11
Built on by
Citing papers per year: 2025: 5; 2026: 3.
8 papers.
- 2025How Far Are AI Scientists from Changing the World?cited by 15
- 2025Agent That Debugs: Dynamic State-Guided Vulnerability Repaircited by 7
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrievalcited by 7
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generationcited by 5
- 2025Knowledge Graph Based Repository-Level Code Generationcited by 4
- 2026Your Code Agent Can Grow Alongside You with Structured Memorycited by 4
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Taskscited by 1
- 2026Enhancing the Code Reasoning Capabilities of LLMs via Consistency-based Reinforcement Learningcited by 1
- 2026Enhancing the Code Reasoning Capabilities of LLMs via Consistency-based Reinforcement Learning18 May 2026
- 2026Your Code Agent Can Grow Alongside You with Structured Memory25 Feb 2026
- 2026Bridging the Knowledge Void: Inference-time Acquisition of Unfamiliar Programming Languages for Coding Tasks16 Jan 2026
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval27 Sep 2025
- 2025How Far Are AI Scientists from Changing the World?31 Jul 2025
- 2025Knowledge Graph Based Repository-Level Code Generation20 May 2025
- 2025YABLoCo: Yet Another Benchmark for Long Context Code Generation7 May 2025
- 2025Agent That Debugs: Dynamic State-Guided Vulnerability Repair10 Apr 2025