mlsanityData to 7 Oct 2026

ContextModule: Improving Code Completion via Repository-level Contextual Information

arXiv 2412.08063 ↗First posted 11 Dec 2024cs.SE cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 14 of its 35 references that are in the map. First posted on arXiv 11 Dec 2024.

Builds on

14 of 35 references.

References · 14

  1. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  2. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  3. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  4. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  5. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  6. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  7. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  8. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  9. 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 325
  10. 2022Efficient Training of Language Models to Fill in the Middlecited by 248
  11. 2023Planning with Large Language Models for Code Generationcited by 179
  12. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
2 more
  1. 2023Large Language Model-Aware In-Context Learning for Code Generationcited by 42
  2. 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 1.

3 papers.