RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion
Code Large Language Models (CodeLLMs) have demonstrated impressive proficiency in code completion tasks. However, they often fall short of fully understanding the extensive context of a project repository, such as the intricacies of relevant files and class hierarchies, which can result in less precise completions. To overcome these limitations, we present RepoHyper, a multifaceted framework designed to address the complex challenges associated with the completion of code at the repository level. Central to RepoHyper is the Repo-Level Semantic Graph (RSG), a novel semantic graph structure that encapsulates the vast context of code repositories. Furthermore, RepoHyper leverages Expand and Refine retrieval method, including a graph expansion and a link prediction algorithm applied to the RSG, enabling effective retrieval and prioritization of relevant code snippets. Our evaluations show that RepoHyper markedly outperforms existing techniques in repository-level code completion, showcasing enhanced accuracy across various datasets when compared to several strong baselines.
Authors
- Hoang Ngo Phan (ORCID: https://orcid.org/0000-0003-0778-4816)
- Huy N. Phan
- Tien N. Nguyen (ORCID: https://orcid.org/0009-0006-7962-6090)
- Nghi D. Q. Bui (ORCID: https://orcid.org/0000-0003-1984-4329)
Institutions
- FPT University (VN)
- The University of Texas at Dallas (US)
- Nanyang Technological University (SG)
Publication Details
- Published
- 2025-04-27
- DOI
- https://doi.org/10.1109/forge66646.2025.00009
- Citations
- 2
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 6.49
Funders
- National Science Foundation
- National Security Agency