mlsanityData to 14 Oct 2026

RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code Generation

arXiv 2507.14791 ↗First posted 20 Jul 2025cs.SEcited by 4

Not on the map. Why?

Abstract (arXiv)

Repository-level code generation aims to generate code within the context of a specified repository. Existing approaches typically employ retrieval-augmented generation (RAG) techniques to provide LLMs with relevant contextual information extracted from the repository. However, these approaches often struggle with effectively identifying truly relevant contexts that capture the rich semantics of the repository, and their contextual perspectives remains narrow. Moreover, most approaches fail to account for the structural relationships in the retrieved code during prompt construction, hindering the LLM's ability to accurately interpret the context. To address these issues, we propose RepoScope, which leverages call chain-aware multi-view context for repository-level code generation. RepoScope constructs a Repository Structural Semantic Graph (RSSG) and retrieves a comprehensive four-view context, integrating both structural and similarity-based contexts. We propose a novel call chain prediction method that utilizes the repository's structural semantics to improve the identification of callees in the target function. Additionally, we present a structure-preserving serialization algorithm for prompt construction, ensuring the coherence of the context for the LLM. Notably, RepoScope relies solely on static analysis, eliminating the need for additional training or multiple LLM queries, thus ensuring both efficiency and generalizability. Evaluation on widely-used repository-level code generation benchmarks (CoderEval and DevEval) demonstrates that RepoScope outperforms state-of-the-art methods, achieving up to a 36.35% relative improvement in pass@1 scores. Further experiments emphasize RepoScope's potential to improve code generation across different tasks and its ability to integrate effectively with existing approaches.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 20 Jul 2025.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026In Line with Context: Repository-Level Code Generation via Context Inlining
  2. 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation
  3. 2026MRCoder: An Efficient Context Selecting Approach for Repository-Level Code Generation ↗
  4. 2026TICoder: A Repository-Level Code Generation Framework with Test-Driven Planning and Implementation-Aware Reuse ↗
  5. 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation
  6. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
  7. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
  8. 2025FastCoder: Accelerating Repository-level Code Generation via Efficient Retrieval and Verification