paper-with-me

홈 › Papers

ContextModule: Improving Code Completion via Repository-level Contextual Information

2024-12-11 · Zhanming Guan, Junlin Liu, Jierui Liu, Chao Peng, Dexin Liu, Ningyuan Sun, Bo Jiang, Wenchao Li, Jie Liu, Hang Zhu

Large Language Models (LLMs) have demonstrated impressive capabilities in code completion tasks, where they assist developers by predicting and generating new code in real-time. However, existing LLM-based code completion systems primarily rely on the immediate context of the file being edited, often missing valuable repository-level information, user behaviour and edit history that could improve suggestion accuracy. Additionally, challenges such as efficiently retrieving relevant code snippets from large repositories, incorporating user behavior, and balancing accuracy with low-latency requirements in production environments remain unresolved. In this paper, we propose ContextModule, a framework designed to enhance LLM-based code completion by retrieving and integrating three types of contextual information from the repository: user behavior-based code, similar code snippets, and critical symbol definitions. By capturing user interactions across files and leveraging repository-wide static analysis, ContextModule improves the relevance and precision of generated code. We implement performance optimizations, such as index caching, to ensure the system meets the latency constraints of real-world coding environments. Experimental results and industrial practise demonstrate that ContextModule significantly improves code completion accuracy and user acceptance rates.

📄 PDF Abstract BibTeX arXiv:2412.08063

Code (0)

등록된 구현이 없습니다.

Tasks

Code Completion

Similar Papers 제목 키워드 기반

RAMBO: Enhancing RAG-based Repository-Level Method Body Completion

2024-09-23 · Tuan-Dung Bui, Duc-Thieu Luu-Van, Thanh-Phat Nguyen, Thu-Trang Nguyen 외

Code completion is essential in software development, helping developers by predicting code snippets based on context. Among completion tasks, Method Body Completion (MBC) is particularly challenging as it involves gener…

Code CompletionCode GenerationRAG

R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Models

2024-06-03 · Ken Deng, Jiaheng Liu, He Zhu, Congnan Liu 외

Code completion models have made significant progress in recent years. Recently, repository-level code completion has drawn more attention in modern software development, and several baseline methods and benchmarks have …

BenchmarkingCode CompletionRetrieval

M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluation

2024-10-28 · Jiaheng Liu, Ken Deng, Congnan Liu, Jian Yang 외

Repository-level code completion has drawn great attention in software engineering, and several benchmark datasets have been introduced. However, existing repository-level code completion benchmarks usually focus on a li…

Code Completion

RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generation

2023-03-22 · Fengji Zhang, Bei Chen, Yue Zhang, Jacky Keung 외

The task of repository-level code completion is to continue writing the unfinished code based on a broader context of the repository. While for automated code completion tools, it is difficult to utilize the useful infor…

Code CompletionLanguage ModelingLanguage ModellingRetrieval

Hierarchical Context Pruning: Optimizing Real-World Code Completion with Repository-Level Pretrained Code LLMs

2024-06-26 · Lei Zhang, Yunshui Li, Jiaming Li, Xiaobo Xia 외

Some recently developed code large language models (Code LLMs) have been pre-trained on repository-level code data (Repo-Code LLMs), enabling these models to recognize repository structures and utilize cross-file informa…

Code Completion