A graph sequence neural architecture for code completion with semantic structure features. Issue 1 (30th December 2021) - Yang, Kang; Yu, Huiqun; Fan, Guisheng; Yang, Xingguang; Huang, Zijie
Abstract: Code completion plays an important role in intelligent software development for accelerating coding efficiency. Recently, the prediction models based on deep learning have achieved good performance in code completion task. However, the existing models cannot avoid three drawbacks: (i) In the existing models, the code representation loses the information (parent–child information between nodes) and lacks many effective features (orientation between nodes). (ii) The known code structure information is not fully utilized, which will cause the model to generate completely irrelevant results. (iii) Simple sequence modeling ignores repeated patterns and structural information. Besides, previous works cannot capture the characteristics of correlation and directionality between nodes. In this paper, we propose a C ode C ompletion approach named CC‐GGNN, which is graph model based on G ated G raph N eural N etworks (GGNNs) to address the problems. We introduce a new architecture to obtain the effective code features from code representation. In order to utilize the known information, we propose Classification Mechanism, which classifies the representation of the node using the known parent node and constructs training graph in the model. The experimental results show that our model outperforms the state‐of‐the‐art methods MRR@5 at most 9.2% and ACC at most 11.4% in datasets. Abstract : In this work, we propose CC‐GGNN method to solve the problems of the code completion. To better represent AST nodes, we classify node's ASTs by known parent node and transform them into a training graph. And we use the classification mechanism of the parent node to help us narrow the range of candidate values and avoid unnecessary calculations. Compared with previous work, the experimental results show that our model can effectively improve the results of code completion.