咨询与建议

看过本文的还看了

相关文献

该作者的其他文献

文献详情 >LSTM-based argument recommenda... 收藏

LSTM-based argument recommendation for non-API methods

LSTM-based argument recommendation for non-API methods

作     者:Guangjie LI Hui LIU Ge LI Sijie SHEN Hanlin TANG Guangjie LI;Hui LIU;Ge LI;Sijie SHEN;Hanlin TANG

作者机构:School of Computer Science and Technology Beijing Institute of Technology School of Electronics Engineering and Computer Science Peking University 

出 版 物:《Science China(Information Sciences)》 (中国科学:信息科学(英文版))

年 卷 期:2020年第63卷第9期

页      面:5-26页

核心收录:

学科分类:0810[工学-信息与通信工程] 0808[工学-电气工程] 08[工学] 0812[工学-计算机科学与技术(可授工学、理学学位)] 081202[工学-计算机软件与理论] 

基  金:supported by National Natural Science Foundation of China (Grant Nos. 61772071,61690205,61832009) National Key R&D Program (Grant Nos. 2018YFB1003904) 

主  题:argument recommendation LSTM deep learning non-API 

摘      要:Automatic code completion is one of the most useful features provided by advanced IDEs. Argument recommendation, as a special kind of code completion, is widely used as well. While existing approaches focus on argument recommendation for popular APIs, a large number of non-API invocations are requesting for accurate argument recommendation as well. To this end, we propose an LSTM-based approach to recommending non-API arguments instantly when method calls are typed in. With data collected from a large corpus of open-source applications, we train an LSTM neural network to recommend actual arguments based on identifiers of the invoked method, the corresponding formal parameter, and a list of syntactically correct candidate arguments. To feed these identifiers into the LSTM neural network, we convert them into fixed-length vectors by Paragraph Vector, an unsupervised neural network based learning algorithm. With the resulting LSTM neural network trained on sample applications, for a given call site we can predict which of the candidate arguments is more likely to be the correct one. We evaluate the proposed approach with tenfold validation on 85 open-source C applications. Results suggest that the proposed approach outperforms the state-of-the-art approaches in recommending non-API arguments. It improves the precision significantly from 71.46% to 83.37%.

读者评论 与其他读者分享你的观点

用户名:未登录
我的评分