paper-with-me

Papers

Syntax-Aware On-the-Fly Code Completion

2022-11-09 · Wannita Takerngsaksiri, Chakkrit Tantithamthavorn, Yuan-Fang Li

Code completion aims to help improve developers' productivity by suggesting the next code tokens from a given context. Various approaches have been proposed to incorporate abstract syntax tree (AST) information for model training, ensuring that code completion is aware of the syntax of the programming languages. However, existing syntax-aware code completion approaches are not on-the-fly, as we found that for every two-thirds of characters that developers type, AST fails to be extracted because it requires the syntactically correct source code, limiting its practicality in real-world scenarios. On the other hand, existing on-the-fly code completion does not consider syntactic information yet. In this paper, we propose PyCoder to leverage token types, a kind of lightweight syntactic information, which is readily available and aligns with the natural order of source code. Our PyCoder is trained in a multi-task training manner so that by learning the supporting task of predicting token types during the training phase, the models achieve better performance on predicting tokens and lines of code without the need for token types in the inference phase. Comprehensive experiments show that PyCoder achieves the first rank on the CodeXGLUE leaderboard with an accuracy of 77.12% for the token-level predictions, which is 0.43%-24.25% more accurate than baselines. In addition, PyCoder achieves an exact match of 43.37% for the line-level predictions, which is 3.63%-84.73% more accurate than baselines. These results lead us to conclude that token type information (an alternative to syntactic information) that is rarely used in the past can greatly improve the performance of code completion approaches, without requiring the syntactically correct source code like AST-based approaches do. Our PyCoder is publicly available on HuggingFace and GitHub.

📄 PDF Abstract BibTeX arXiv:2211.04673

Code (1)

awsm-research/pycoder 공식 구현 pytorch

Tasks

Code Completion

Methods 이 논문이 사용한 방법론

AWARE We propose to theoretically and empirically examine the effect of incorporating weighting schemes into walk-aggregating GNNs. To this end, we propose a simple, interpretable, and…

Similar Papers 제목 키워드 기반

Comparative Analysis of Large Language Models for Context-Aware Code Completion using SAFIM Framework

2025-02-21 · Hang Zhang, Yanxin Shen, Lun Wang, Chuanqi Shi 외

The advent of Large Language Models (LLMs) has revolutionized code completion, transforming it into a more intelligent and context-aware feature in modern integrated development environments. These advancements have sign…

Code CompletionCode Generation

Evaluation of LLMs on Syntax-Aware Code Fill-in-the-Middle Tasks

2024-03-07 · Linyuan Gong, Sida Wang, Mostafa Elhoushi, Alvin Cheung

We introduce Syntax-Aware Fill-In-the-Middle (SAFIM), a new benchmark for evaluating Large Language Models (LLMs) on the code Fill-in-the-Middle (FIM) task. This benchmark focuses on syntax-aware completions of program s…

Code Completion

Code Completion by Modeling Flattened Abstract Syntax Trees as Graphs

2021-03-17 · Yanlin Wang, Hui Li

Code completion has become an essential component of integrated development environments. Contemporary code completion methods rely on the abstract syntax tree (AST) to generate syntactically correct code. However, they …

Code CompletionGraph AttentionMulti-Task LearningRepresentation Learning

Neural Models for Source Code Synthesis and Completion

2024-02-08 · Mitodru Niyogi

Natural language (NL) to code suggestion systems assist developers in Integrated Development Environments (IDEs) by translating NL utterances into compilable code snippet. The current approaches mainly involve hard-coded…

Code CompletionData AugmentationLanguage ModellingSemantic Parsing

Learning Deep Semantics for Test Completion

2023-02-20 · Pengyu Nie, Rahul Banerjee, Junyi Jessy Li, Raymond J. Mooney 외

Writing tests is a time-consuming yet essential task during software development. We propose to leverage recent advances in deep learning for text and code generation to assist developers in writing tests. We formalize t…

Code CompletionCode Generation