RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion
Huy N. Phan, Hoang N. Phan, Tien N. Nguyen, Nghi D. Q. Bui

TL;DR
RepoHyper introduces a semantic graph-based framework that significantly improves repository-level code completion by effectively capturing extensive project context and employing expand-and-refine retrieval techniques.
Contribution
It presents the Repo-level Semantic Graph and a novel expand-refine retrieval method, advancing code completion by better understanding project-wide code context.
Findings
Outperforms existing code completion methods on multiple datasets
Achieves higher accuracy in retrieving relevant code snippets
Effectively captures complex project context with the semantic graph
Abstract
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 \tool, a multifaceted framework designed to address the complex challenges associated with repository-level code completion. Central to RepoHYPER is the {\em 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 the effective retrieval and prioritization of relevant code snippets. Our evaluations show that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSemantic Web and Ontologies · Web Data Mining and Analysis · Data Mining Algorithms and Applications
