paper-with-me

홈 › Papers

Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion

2024-05-30 · Wei Cheng, Yuhan Wu, Wei Hu

Recent years have witnessed the deployment of code language models (LMs) in various code intelligence tasks such as code completion. Yet, it is challenging for pre-trained LMs to generate correct completions in private repositories. Previous studies retrieve cross-file context based on import relations or text similarity, which is insufficiently relevant to completion targets. In this paper, we propose a dataflow-guided retrieval augmentation approach, called DraCo, for repository-level code completion. DraCo parses a private repository into code entities and establishes their relations through an extended dataflow analysis, forming a repo-specific context graph. Whenever triggering code completion, DraCo precisely retrieves relevant background knowledge from the repo-specific context graph and generates well-formed prompts to query code LMs. Furthermore, we construct a large Python dataset, ReccEval, with more diverse completion targets. Our experiments demonstrate the superior accuracy and applicable efficiency of DraCo, improving code exact match by 3.43% and identifier F1-score by 3.27% on average compared to the state-of-the-art approach.

📄 PDF Abstract BibTeX arXiv:2405.19782

Code (1)

nju-websoft/DraCo 공식 구현

Tasks

Code CompletionRetrievaltext similarity

Similar Papers 제목 키워드 기반

CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion

2025-09-19 · Sheng Zhang, Yifan Ding, Shuquan Lian, Shun Song 외 arxiv

Repository-level code completion automatically predicts the unfinished code based on the broader information from the repository. Recent strides in Code Large Language Models (code LLMs) have spurred the development of r…

Code Completion

RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval

2025-09-27 · Pratik Shah, Rajat Ghosh, Aryan Singhal, Debojyoti Dutta arxiv

General-purpose automated software engineering (ASE) includes tasks such as code completion, retrieval, repair, QA, and summarization. These tasks require a code retrieval system that can handle specific queries about co…

Natural Language QueriesQuestion AnsweringCode CompletionCode Search

Beyond Function-Level Search: Repository-Aware Dual-Encoder Code Retrieval with Adversarial Verification

2025-10-16 · Aofan Liu, Shiyuan Song, Haoxuan Li, Cehao Yang 외 arxiv

The escalating complexity of modern codebases has intensified the need for retrieval systems capable of interpreting cross-component change intents, a capability fundamentally absent in conventional function-level search…

Natural Language Queries

SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion

2025-08-13 · Xiaohan Chen, Zhongying Pan, Quan Feng, Yu Tian 외 arxiv

Despite Retrieval-Augmented Generation improving code completion, traditional retrieval methods struggle with information redundancy and a lack of diversity within limited context windows. To solve this, we propose a res…

Code Completion

Beyond Code Snippets: Benchmarking LLMs on Repository-Level Question Answering

2026-03-27 · Yoseph Berhanu Alebachew, Hunter Leary, Swanand Vaishampayan, Chris Brown arxiv

Large Language Models (LLMs) have shown impressive capabilities across software engineering tasks, including question answering (QA). However, most studies and benchmarks focus on isolated functions or single-file snippe…

Question Answering