当前位置: X-MOL 学术Sci. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A Neural Network Based Intelligent Support Model for Program Code Completion
Scientific Programming ( IF 1.672 ) Pub Date : 2020-07-14 , DOI: 10.1155/2020/7426461
Md. Mostafizer Rahman 1 , Yutaka Watanobe 1 , Keita Nakamura 1
Affiliation  

In recent years, millions of source codes are generated in different languages on a daily basis all over the world. A deep neural network-based intelligent support model for source code completion would be a great advantage in software engineering and programming education fields. Vast numbers of syntax, logical, and other critical errors that cannot be detected by normal compilers continue to exist in source codes, and the development of an intelligent evaluation methodology that does not rely on manual compilation has become essential. Even experienced programmers often find it necessary to analyze an entire program in order to find a single error and are thus being forced to waste valuable time debugging their source codes. With this point in mind, we proposed an intelligent model that is based on long short-term memory (LSTM) and combined it with an attention mechanism for source code completion. Thus, the proposed model can detect source code errors with locations and then predict the correct words. In addition, the proposed model can classify the source codes as to whether they are erroneous or not. We trained our proposed model using the source code and then evaluated the performance. All of the data used in our experiments were extracted from Aizu Online Judge (AOJ) system. The experimental results obtained show that the accuracy in terms of error detection and prediction of our proposed model approximately is 62% and source code classification accuracy is approximately 96% which outperformed a standard LSTM and other state-of-the-art models. Moreover, in comparison to state-of-the-art models, our proposed model achieved an interesting level of success in terms of error detection, prediction, and classification when applied to long source code sequences. Overall, these experimental results indicate the usefulness of our proposed model in software engineering and programming education arena.

中文翻译:

基于神经网络的程序代码补全智能支持模型

近年来,全世界每天都以不同语言生成数百万个源代码。基于深度神经网络的源代码完成智能支持模型将在软件工程和编程教育领域具有巨大优势。大量普通编译器无法检测到的语法、逻辑和其他严重错误继续存在于源代码中,开发一种不依赖于手动编译的智能评估方法变得至关重要。即使是有经验的程序员也经常发现有必要分析整个程序才能找到一个错误,因此不得不浪费宝贵的时间调试他们的源代码。考虑到这一点,我们提出了一种基于长短期记忆 (LSTM) 的智能模型,并将其与用于源代码完成的注意力机制相结合。因此,所提出的模型可以检测带有位置的源代码错误,然后预测正确的单词。此外,所提出的模型可以对源代码是否有误进行分类。我们使用源代码训练了我们提出的模型,然后评估了性能。我们实验中使用的所有数据都是从 Aizu Online Judge (AOJ) 系统中提取的。获得的实验结果表明,我们提出的模型在错误检测和预测方面的准确度约为 62%,源代码分类准确度约为 96%,优于标准 LSTM 和其他最先进的模型。而且,与最先进的模型相比,我们提出的模型在应用于长源代码序列时在错误检测、预测和分类方面取得了令人感兴趣的成功水平。总的来说,这些实验结果表明我们提出的模型在软件工程和编程教育领域的有用性。
更新日期:2020-07-14
down
wechat
bug