
Research Article
Code Prediction Based on Graph Embedding Model
@INPROCEEDINGS{10.1007/978-3-030-67540-0_26, author={Kang Yang and Huiqun Yu and Guisheng Fan and Xingguang Yang and Liqiong Chen}, title={Code Prediction Based on Graph Embedding Model}, proceedings={Collaborative Computing: Networking, Applications and Worksharing. 16th EAI International Conference, CollaborateCom 2020, Shanghai, China, October 16--18, 2020, Proceedings, Part II}, proceedings_a={COLLABORATECOM PART 2}, year={2021}, month={1}, keywords={Big code Graph embedding Code prediction}, doi={10.1007/978-3-030-67540-0_26} }
- Kang Yang
Huiqun Yu
Guisheng Fan
Xingguang Yang
Liqiong Chen
Year: 2021
Code Prediction Based on Graph Embedding Model
COLLABORATECOM PART 2
Springer
DOI: 10.1007/978-3-030-67540-0_26
Abstract
Code prediction aims to accelerate the efficiency of programmer development. However, its prediction accuracy is still a great challenge. To facilitate the interpretability of the code prediction model and improve the accuracy of prediction. In this paper, the source code’s Abstract Syntax Tree (AST) is used to extract relevant structural paths between nodes and convert them into training graphs. The embedded model can convert the feature of the node sequence in the training graph into a vector that is convenient for quantization. We calculate the similarity between the candidate value and the parent node vector of the predicted path to obtain the predicted value. Experiments show that by using prediction data to increase the weight of related nodes in the graph, the model can extract more useful structural features, especially in Value prediction tasks. Adjusting the parameters embedded in the graph can improve the accuracy of the model.