REPOFUSE: Repository-Level Code Completion with Fused Dual Context

Ming Liang, Xiaoheng Xie, Gehao Zhang, Xunjin Zheng,Peng Di, Wei Jiang, Hongwei Chen,Chengpeng Wang,Gang Fan

CoRR(2024)

引用 0|浏览0
暂无评分
摘要
The success of language models in code assistance has spurred the proposal of repository-level code completion as a means to enhance prediction accuracy, utilizing the context from the entire codebase. However, this amplified context can inadvertently increase inference latency, potentially undermining the developer experience and deterring tool adoption-a challenge we termed the Context-Latency Conundrum. This paper introduces RepoGenix, a pioneering solution designed to enhance repository-level code completion without the latency trade-off. RepoGenix uniquely fuses two types of contexts: the analogy context, rooted in code analogies, and the rationale context, which encompasses in-depth semantic relationships. We propose a novel rank truncated generation (RTG) technique that efficiently condenses these contexts into prompts with restricted size. This enables RepoGenix to deliver precise code completions while maintaining inference efficiency. Through testing with the CrossCodeEval suite, RepoGenix has demonstrated a significant leap over existing models, achieving a 40.90 completions and a 26.8 validation, RepoGenix has been integrated into the workflow of a large enterprise, where it actively supports various coding tasks.
更多
查看译文
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要