Title: Code completion for programming education based on deep learning
Authors: Kenta Terada; Yutaka Watanobe
Addresses: Computer Science and Engineering, University of Aizu, Fukushima, 965-8580, Japan ' Computer Science and Engineering, University of Aizu, Fukushima, 965-8580, Japan
Abstract: In solving programming problems, it is difficult for beginners to create a program from scratch. One way to navigate this difficulty is to suggest the next word following an incomplete program. In the present study, we propose a method for code completion characterised by two principal elements: the prediction of the next within-vocabulary word and the prediction of the next referenceable identifier. For the prediction of within-vocabulary words, a neural language model based on an LSTM network with an attention mechanism is proposed. Additionally, for the prediction of referenceable identifiers, a model based on a pointer network to a given incomplete program is proposed. For evaluation of the proposed method, source code accumulated in an online judge system is used. The results of the experiment demonstrate that in both statically and dynamically typed languages, the proposed method can predict the next word to a high degree of accuracy.
Keywords: programming education; code completion; deep learning; LSTM; pointer network.
DOI: 10.1504/IJCISTUDIES.2021.115424
International Journal of Computational Intelligence Studies, 2021 Vol.10 No.2/3, pp.78 - 98
Received: 22 Mar 2020
Accepted: 25 Jun 2020
Published online: 02 Jun 2021 *