Litcius/Paper detail

Code completion for programming education based on deep learning

Kenta Terada, Yutaka Watanobe

2021International Journal of Computational Intelligence Studies17 citationsDOIOpen Access PDF

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.

Topics & Concepts

Computer sciencePointer (user interface)IdentifierVocabularyWord (group theory)Artificial intelligenceScratchArtificial neural networkCode (set theory)Source codeNatural language processingRecurrent neural networkProgramming languageMachine learningPhilosophySet (abstract data type)LinguisticsSoftware Engineering ResearchOnline Learning and AnalyticsTeaching and Learning Programming