A Combined Approach of Program Analysis and Deep Learning for Code Completion

Code completion, a critical feature in integrated development environments, significantly reduces the coding workload for developers. Traditional code completion techniques often focus on the natural language properties of code, overlooking the structural characteristics of programming languages. To address this issue, this paper introduces a novel approach combining program analysis and deep learning to enhance the accuracy and efficiency of code completion. Initially, the research utilizes program analysis techniques to explore the structural and semantic information of code snippets deeply, constructing a program graph. Graph Gated Neural Networks (GGNN) and Transformer technologies are then employed to represent the program graph, capturing the local features and long-range dependencies of the code. The model integrates both the semantic and structural information of code, thereby providing more accurate completion suggestions. Experimental evaluations were conducted on public datasets for Python and JavaScript, two extensively used programming languages. The results demonstrate that our method significantly outperforms existing approaches in terms of code completion accuracy and Mean Reciprocal Rank (MRR).

Authors

Institutions

Publication Details

Journal
Scientific Journal of Technology
Published
2024-08-21
DOI
https://doi.org/10.54691/hkyc3a89
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Combined Approach of Program Analysis and Deep Learning for Code Completion

Yi Liu
Scientific Journal of Technology
Software Engineering Research
article

A Combined Approach of Program Analysis and Deep Learning for Code Completion

Yi Liu
article en

Abstract

Code completion, a critical feature in integrated development environments, significantly reduces the coding workload for developers. Traditional code completion techniques often focus on the natural language properties of code, overlooking the structural characteristics of programming languages. To address this issue, this paper introduces a novel approach combining program analysis and deep learning to enhance the accuracy and efficiency of code completion. Initially, the research utilizes program analysis techniques to explore the structural and semantic information of code snippets deeply, constructing a program graph. Graph Gated Neural Networks (GGNN) and Transformer technologies are then employed to represent the program graph, capturing the local features and long-range dependencies of the code. The model integrates both the semantic and structural information of code, thereby providing more accurate completion suggestions. Experimental evaluations were conducted on public datasets for Python and JavaScript, two extensively used programming languages. The results demonstrate that our method significantly outperforms existing approaches in terms of code completion accuracy and Mean Reciprocal Rank (MRR).

Scientific Journal of TechnologyVol. 6(8)
Hunan University of Humanities, Science and Technology (CN)
Openalex Percentile: Top 79%
Software Engineering Research
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.