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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Deng, Ken, Liu, Jiaheng, Zhu, He, Liu, Congnan, Li, Jingxin, Wang, Jiakai, Zhao, Peng, Zhang, Chenchen, Wu, Yanan, Yin, Xueqiao, Zhang, Yuanxing, Zhan, Zizheng, Su, Wenbo, Xiang, Bangyu, Ge, Tiezheng, Zheng, Bo
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866916932400185344
author Deng, Ken
Liu, Jiaheng
Zhu, He
Liu, Congnan
Li, Jingxin
Wang, Jiakai
Zhao, Peng
Zhang, Chenchen
Wu, Yanan
Yin, Xueqiao
Zhang, Yuanxing
Zhan, Zizheng
Su, Wenbo
Xiang, Bangyu
Ge, Tiezheng
Zheng, Bo
author_facet Deng, Ken
Liu, Jiaheng
Zhu, He
Liu, Congnan
Li, Jingxin
Wang, Jiakai
Zhao, Peng
Zhang, Chenchen
Wu, Yanan
Yin, Xueqiao
Zhang, Yuanxing
Zhan, Zizheng
Su, Wenbo
Xiang, Bangyu
Ge, Tiezheng
Zheng, Bo
contents 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 been proposed. However, existing repository-level code completion methods often fall short of fully using the extensive context of a project repository, such as the intricacies of relevant files and class hierarchies. Besides, the existing benchmarks usually focus on limited code completion scenarios, which cannot reflect the repository-level code completion abilities well of existing methods. To address these limitations, we propose the R2C2-Coder to enhance and benchmark the real-world repository-level code completion abilities of code Large Language Models, where the R2C2-Coder includes a code prompt construction method R2C2-Enhance and a well-designed benchmark R2C2-Bench. Specifically, first, in R2C2-Enhance, we first construct the candidate retrieval pool and then assemble the completion prompt by retrieving from the retrieval pool for each completion cursor position. Second, based on R2C2 -Enhance, we can construct a more challenging and diverse R2C2-Bench with training, validation and test splits, where a context perturbation strategy is proposed to simulate the real-world repository-level code completion well. Extensive results on multiple benchmarks demonstrate the effectiveness of our R2C2-Coder.
format Preprint
id arxiv_https___arxiv_org_abs_2406_01359
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Models
Deng, Ken
Liu, Jiaheng
Zhu, He
Liu, Congnan
Li, Jingxin
Wang, Jiakai
Zhao, Peng
Zhang, Chenchen
Wu, Yanan
Yin, Xueqiao
Zhang, Yuanxing
Zhan, Zizheng
Su, Wenbo
Xiang, Bangyu
Ge, Tiezheng
Zheng, Bo
Computation and Language
Software Engineering
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 been proposed. However, existing repository-level code completion methods often fall short of fully using the extensive context of a project repository, such as the intricacies of relevant files and class hierarchies. Besides, the existing benchmarks usually focus on limited code completion scenarios, which cannot reflect the repository-level code completion abilities well of existing methods. To address these limitations, we propose the R2C2-Coder to enhance and benchmark the real-world repository-level code completion abilities of code Large Language Models, where the R2C2-Coder includes a code prompt construction method R2C2-Enhance and a well-designed benchmark R2C2-Bench. Specifically, first, in R2C2-Enhance, we first construct the candidate retrieval pool and then assemble the completion prompt by retrieving from the retrieval pool for each completion cursor position. Second, based on R2C2 -Enhance, we can construct a more challenging and diverse R2C2-Bench with training, validation and test splits, where a context perturbation strategy is proposed to simulate the real-world repository-level code completion well. Extensive results on multiple benchmarks demonstrate the effectiveness of our R2C2-Coder.
title R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Models
topic Computation and Language
Software Engineering
url https://arxiv.org/abs/2406.01359