RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code Generation
This program is tentative and subject to change.
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. We provide the replication package at https://github.com/Lorien1128/RepoScope.
This program is tentative and subject to change.
Wed 15 AprDisplayed time zone: Brasilia, Distrito Federal, Brazil change
14:00 - 15:30 | AI for Software Engineering 6Research Track at Europa II Chair(s): Miryung Kim UCLA and Amazon Web Services | ||
14:00 15mTalk | Cobblestone: A Divide-and-Conquer Approach for Automating Formal Verification Research Track Saketh Ram Kasibatla UC San Diego, Arpan Agrawal University of Illinois Urbana-Champaign, Yuriy Brun University of Massachusetts, Sorin Lerner University of California at San Diego, Talia Lily Ringer University of Illinois Urbana-Champaign, Emily First Rutgers University DOI Pre-print | ||
14:15 15mTalk | RISE: Rule-Driven SQL Dialect Translation via Query Reduction Research Track Xudong Xie Institute of Software Chinese Academy of Sciences, China, Yuwei Zhang Institute of Software Chinese Academy of Sciences, Wensheng Dou Institute of Software Chinese Academy of Sciences, Yu Gao Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences, Ziyu Cui Institute of Software at Chinese Academy of Sciences, Jiansen Song Institute of Software at Chinese Academy of Sciences, Rui Yang Institute of Software, Chinese Academy of Sciences, Jun Wei Institute of Software at Chinese Academy of Sciences; University of Chinese Academy of Sciences | ||
14:30 15mTalk | RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code Generation Research Track Yang Liu , Li Zhang Beihang University, Fang Liu Beihang University, Zhuohang Wang Beihang University, Donglin Wei Beihang University, Zhishuo Yang Beihang University, Kechi Zhang Peking University, China, Jia Li , Lin Shi Beihang University Pre-print | ||
14:45 15mTalk | What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond Research Track Wenchao Gu Technical University of Munich, Juntao Chen Sun Yat-Sen University, Yanlin Wang Sun Yat-sen University, Tianyue Jiang Sun Yat-sen University, Xingzhe Li Sun Yat-Sen University, Mingwei Liu Sun Yat-Sen University, Xilin Liu Huawei Cloud, Yuchi Ma Huawei Cloud Computing Technologies, Zibin Zheng Sun Yat-sen University | ||
15:00 15mTalk | SEER: Enhancing Chain-of-Thought Code Generation through Self-Exploring Deep Reasoning Research Track Shuzheng Gao Chinese University of Hong Kong, Chaozheng Wang The Chinese University of Hong Kong, Cuiyun Gao Harbin Institute of Technology, Shenzhen, Michael Lyu The Chinese University of Hong Kong Media Attached | ||
15:15 15mTalk | SmartC2Rust: Iterative, Feedback-Driven C-to-Rust Translation via Large Language Models for Safety and Equivalence Research Track Momoko Shiraishi The University of Tokyo, Yinzhi Cao Johns Hopkins University, Takahiro Shinagawa The University of Tokyo | ||