Graph Embedding Code Prediction Model Integrating Semantic Features
- Department of Computer Science and Engineering, ECUST
Shanghai, China - Shanghai Key Laboratory of Computer Software Evaluating and Testing, China
Shanghai, China
yhq@ecust.edu.cn, Corresponding author - Shanghai Engineering Research Center of Smart Energy, Shanghai, China
Shanghai, China
gsfan@ecust.edu.cn, Corresponding author
Abstract
With the advent of Big Code, code prediction has received widespread attention. However, the state-of-the-art code prediction techniques are inadequate in terms of accuracy, interpretability and efficiency. Therefore, in this paper, we propose a graph embedding model that integrates code semantic features. The model extracts the structural paths between the nodes in source code file’s Abstract Syntax Tree(AST). Then, we convert paths into training graph and extracted interdependent semantic structural features from the context of AST. Semantic structure features can filter predicted candidate values and effectively solve the problem of Out-of-Word(OoV). The graph embedding model converts the structural features of nodes into vectors which facilitates quantitative calculations. Finally, the vector similarity of the nodes is used to complete the prediction tasks of TYPE and VALUE. Experimental results show that compared with the existing state-of-the-art method, our method has higher prediction accuracy and less time consumption.
Key words
Big Code, Graph Embedding, Code Prediction
Digital Object Identifier (DOI)
https://doi.org/10.2298/CSIS190908027Y
Publication information
Volume 17, Issue 3 (October 2020)
Year of Publication: 2020
ISSN: 2406-1018 (Online)
Publisher: ComSIS Consortium
Full text
Available in PDF
Portable Document Format
How to cite
Yang, K., Yu, H., Fan, G., Yang, X.: Graph Embedding Code Prediction Model Integrating Semantic Features. Computer Science and Information Systems, Vol. 17, No. 3, 907–926. (2020), https://doi.org/10.2298/CSIS190908027Y