Abstract (AI)
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.
Key Findings
Research Object
Research Subject
Publication Details
Publication Date
2025-03-21
Journal
Publisher
ISSN
Access Type
Author Information
Download PDF