A Comprehensive Study on Code Completion for Large Language Models

Large language models have demonstrated remarkable capabilities in code generation, exhibiting a profound understanding of code semantics and functionality. Code completion is a critical task within code generation, playing a key role in enhancing development efficiency and facilitating code comprehension. Although some studies on code completion based on LLMs have emerged, most of these efforts rely on transformer architectures, autoregressive generation models, and graph neural networks, making it difficult to obtain a clear and comprehensive understanding of their overall development storyline. Therefore, this work conducts a comprehensive survey of existing large-model-based code completion approaches from multiple perspectives, systematically analyzing their performance, advantages, and limitations from the viewpoints of task requirements and technical methodologies. To evaluate the real-world effectiveness of current approaches, this study collects representative code snippets and constructs multi-granularity completion samples using multilevel semantic analysis and generation model evaluation methods. These samples cover various programming languages, including Python, Java, and C++. Subsequently, a hierarchical code completion evaluation is conducted to compare the performance of different LLMs across different programming languages. By leveraging these techniques, this paper provides a comprehensive analysis of the practical performance and limitations of different models in real-world development scenarios. Experimental results indicate that current LLM-based code completion methods generally achieve high accuracy and strong contextual understanding in common code completion tasks. However, there is still room for improvement in handling long-range dependencies and complex syntactic structures. The findings suggest that while LLMs perform well in completing simple to moderately complex tasks, their effectiveness declines when dealing with code segments involving long-span dependencies or intricate relationships, particularly in scenarios with complex multi-function calls, nested structures, and asynchronous programming.

Authors

Institutions

Publication Details

Published
2025-03-21
DOI
https://doi.org/10.1109/icaace65325.2025.11020128
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Comprehensive Study on Code Completion for Large Language Models

Yanpeng Cai
Topic Modeling
article

A Comprehensive Study on Code Completion for Large Language Models

Yanpeng Cai
article en

Abstract

Large language models have demonstrated remarkable capabilities in code generation, exhibiting a profound understanding of code semantics and functionality. Code completion is a critical task within code generation, playing a key role in enhancing development efficiency and facilitating code comprehension. Although some studies on code completion based on LLMs have emerged, most of these efforts rely on transformer architectures, autoregressive generation models, and graph neural networks, making it difficult to obtain a clear and comprehensive understanding of their overall development storyline. Therefore, this work conducts a comprehensive survey of existing large-model-based code completion approaches from multiple perspectives, systematically analyzing their performance, advantages, and limitations from the viewpoints of task requirements and technical methodologies. To evaluate the real-world effectiveness of current approaches, this study collects representative code snippets and constructs multi-granularity completion samples using multilevel semantic analysis and generation model evaluation methods. These samples cover various programming languages, including Python, Java, and C++. Subsequently, a hierarchical code completion evaluation is conducted to compare the performance of different LLMs across different programming languages. By leveraging these techniques, this paper provides a comprehensive analysis of the practical performance and limitations of different models in real-world development scenarios. Experimental results indicate that current LLM-based code completion methods generally achieve high accuracy and strong contextual understanding in common code completion tasks. However, there is still room for improvement in handling long-range dependencies and complex syntactic structures. The findings suggest that while LLMs perform well in completing simple to moderately complex tasks, their effectiveness declines when dealing with code segments involving long-span dependencies or intricate relationships, particularly in scenarios with complex multi-function calls, nested structures, and asynchronous programming.

Guangdong University of Technology (CN)
Quality Education
Openalex Percentile: Top 94%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.