Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion
Nanjing University(南京大学);State Key Laboratory for Novel Software Technology, Nanjing University(南京大学计算机软件新技术国家重点实验室);National Institute of Healthcare Data Science, Nanjing University(南京大学国家卫生数据科学研究院)
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.
CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
Key Laboratory of Multimedia Trusted Perception and Efficient Computing Ministry of Education of China(教育部多媒体可信感知与高效计算重点实验室);Xiamen University(厦门大学);Ant Group(蚂蚁集团)
RepoShapley: Shapley-Enhanced Context Filtering for Repository-Level Code Completion
School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳)理工学院);Sun Yat-sen University(中山大学);University of California, San Diego(加利福尼亚大学圣地亚哥分校);Hangzhou Dianzi University(杭州电子科技大学);Shenzhen Future Network of Intelligence Institute (FNii-Shenzhen)(深圳未来网络智能研究所);Guangdong Provincial Key Laboratory of Future Networks of Intelligence, CUHK(SZ)(香港中文大学(深圳)广东省未来网络智能重点实验室)
Package-Aware Approach for Repository-Level Code Completion in Pharo
Univ. Lille, Inria, CNRS, Centrale Lille(里尔大学、法国国家信息与自动化研究所、法国国家科学研究中心、里尔中央理工学院);CNRS, University of Bordeaux, Bordeaux INP(法国国家科学研究中心、波尔多大学、波尔多国立理工学院)
CARET: Training-Free Test-Time Scaling for Repository-Level Code Completion
The University of Arizona(亚利桑那大学);California State University, Long Beach(加州州立大学长滩分校);East Carolina University(东卡罗来纳大学);Nankai University(南开大学);Nanyang Technological University, Singapore(新加坡南洋理工大学)
Evaluating Package-Level Scoping Strategies for Repository-Level Code Completion in Pharo
Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL(里尔大学、法国国家信息与自动化研究所、法国国家科学研究中心、中央里尔学院、CRIStAL实验室);CIRAD, UMR SENS(法国农业研究国际合作中心);CNRS, University of Bordeaux, Bordeaux INP, LaBRI, UMR5800(法国国家科学研究中心、波尔多大学、波尔多理工学院、LaBRI实验室)
Enhancing Knowledge Density via Hierarchical Context Pruning for Retrieval-Augmented Repository-Level Code Completion
MIIT Key Laboratory of Pattern Analysis and Machine Intelligence(信息科技模式分析与机器智能国家重点实验室);College of Computer Science and Technology(计算机科学与技术学院);Huaneng Information Technology Co Ltd(华能信息技术有限公司);Hunan Vanguard Group Corporation Co Ltd(湖南 Vanguard集团有限公司);Tsinghua University(清华大学);Zhejiang University(浙江大学);PowerChina Huadong Engineering Co Ltd(国家电网华东工程有限公司)
FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementation
State Key Laboratory of Multimedia Information Processing, School of Computer Science, Peking University(信息处理国家重点实验室,计算机学院,北京大学);Microsoft Research Asia(微软亚洲研究院)