Evaluation of Source Codes Using Bidirectional LSTM Neural Network

Md. Mostafizer Rahman, Yutaka Watanobe, Keita Nakamura · 2020

Nowadays, computer programming is a core skill in computer science with software and computing-related disciplines. Thus, the demand for skilled programmers around the world is increasing. Programmers are writing codes to meet the needs of the world. Debugging source codes to search for errors is a time-consuming task, especially for logical errors for both novices and experienced programmers. We propose a language model using bidirectional long short-term memory (BiLSTM) neural network for the source code error evaluation. The BiLSTM neural network model considers both past and future context of input sequences of source codes that produces more accurate results for the error identification as well as prediction. In addition, the proposed BiLSTM language model predicts correction and error position in source codes. We trained and evaluated the proposed BiLSTM model using source codes collected from Aizu Online Judge (AOJ) system. The experimental results demonstrated that the accuracy of the proposed BiLSTM model surpassed other unidirectional RNN and LSTM models in terms of error detection and prediction in source codes. The BiLSTM model in this study can be operated as an intelligent model for source code error detection which is helpful in programming education and software engineering fields.

Read the paper · More papers on PaperTik