paper-with-me

홈 › Papers

CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Context

2022-12-20 · Yangruibo Ding, Zijian Wang, Wasi Uddin Ahmad, Murali Krishna Ramanathan, Ramesh Nallapati, Parminder Bhatia, Dan Roth, Bing Xiang

While pre-trained language models (LM) for code have achieved great success in code completion, they generate code conditioned only on the contents within the file, i.e., in-file context, but ignore the rich semantics in other files within the same project, i.e., cross-file context, a critical source of information that is especially useful in modern modular software development. Such overlooking constrains code language models' capacity in code completion, leading to unexpected behaviors such as generating hallucinated class member functions or function calls with unexpected arguments. In this work, we develop a cross-file context finder tool, CCFINDER, that effectively locates and retrieves the most relevant cross-file context. We propose CoCoMIC, a framework that incorporates cross-file context to learn the in-file and cross-file context jointly on top of pretrained code LMs. CoCoMIC successfully improves the existing code LM with a 33.94% relative increase in exact match and a 28.69% relative increase in identifier matching for code completion when the cross-file context is provided.

📄 PDF Abstract BibTeX arXiv:2212.10007

Code (1)

amazon-science/cocomic 공식 구현 pytorch

Tasks

Code Completion

Similar Papers 제목 키워드 기반

Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchy

2021-09-17 · EMNLP 2021 11 · Colin B. Clement, Shuai Lu, Xiaoyu Liu, Michele Tufano 외

Statistical language modeling and translation with transformers have found many successful applications in program understanding and generation tasks, setting high benchmarks for tools in modern software development envi…

Code CompletionCode GenerationCode SummarizationLanguage Modeling+3

CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completion

2023-10-17 · NeurIPS 2023 11

Code completion models have made significant progress in recent years, yet current popular evaluation datasets, such as HumanEval and MBPP, predominantly focus on code completion tasks within a single file. This over-sim…

Code CompletionHumanEvalmbpp

RepoBench: Benchmarking Repository-Level Code Auto-Completion Systems

2023-06-05 · Tianyang Liu, Canwen Xu, Julian McAuley

Large Language Models (LLMs) have greatly advanced code auto-completion systems, with a potential for substantial productivity enhancements for developers. However, current benchmarks mainly focus on single-file tasks, l…

BenchmarkingC++ codeCode CompletionRetrieval

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

ReACC: A Retrieval-Augmented Code Completion Framework

2022-03-15 · ACL 2022 5 · Shuai Lu, Nan Duan, Hojae Han, Daya Guo 외

Code completion, which aims to predict the following code token(s) according to the code context, can improve the productivity of software development. Recent work has proved that statistical language modeling with trans…

Code CompletionLanguage ModelingLanguage ModellingRetrieval