中国科学:信息科学(英文版)2024,Vol.67Issue(1) :82-100.DOI:10.1007/s11432-021-3665-1

ASTSDL:predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model

Yaoshen YU Zhiqiu HUANG Guohua SHEN Weiwei LI Yichao SHAO
中国科学:信息科学(英文版)2024,Vol.67Issue(1) :82-100.DOI:10.1007/s11432-021-3665-1

ASTSDL:predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model

Yaoshen YU 1Zhiqiu HUANG 2Guohua SHEN 2Weiwei LI 2Yichao SHAO1
扫码查看

作者信息

  • 1. College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China
  • 2. College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics,Nanjing 211106,China;Collaborative Innovation Center of Novel Software Technology and Industrialization,Nanjing 211106,China;Key Laboratory of Safety-Critical Software,Ministry of Industry and Information Technology,Nanjing 211106,China
  • 折叠

Abstract

Code recommendation systems have been widely used in helping developers implement unfamiliar programming tasks.Many existing code recommenders or code search engines can retrieve relevant code rapidly with high accuracy,however,they cannot recommend any code outside similar ones.We propose an approach to predict the functionality of incomplete programming code by using syntactical information,and providing a list of potential functionalities to guess what the developers want,in order to increase the diversity of recommendations.In this paper,we propose a deep learning model called ASTSDL,which uses a sequence-based representation of source code to predict functionality.We extract syntactical information from the abstract syntax tree(AST)of the source code,apply a deep learning model to capture the syntactic and sequential information,and predict the functionality of the source code fragments.The experimental results demonstrate that ASTSDL can effectively predict the functionality of incomplete code with an accuracy above 84%in the top-10 list,even if there is only half of the complete code.

Key words

functionality prediction/incomplete programming code/syntactical information/code represen-tation model/deep learning algorithm

引用本文复制引用

基金项目

National Key R&D Program of China(2018YFB1003900)

China Postdoctoral Science Foundation(2018M632304)

出版年

2024
中国科学:信息科学(英文版)
中国科学院

中国科学:信息科学(英文版)

CSTPCDEI
影响因子:0.715
ISSN:1674-733X
参考文献量52
段落导航相关论文