Academy & Industry Research Collaboration Center (AIRCC)

Volume 11, Number 14, September 2021

A Deep Learning based Approach to Argument Recommendation

  Authors

Guangjie Li, Yi Tang, Biyi Yi, Xiang Zhang and Yan He, National Innovation Institute of Defense Technology, China

  Abstract

Code completion is one of the most useful features provided by advanced IDEs and is widely used by software developers. However, as a kind of code completion, recommending arguments for method calls is less used. Most of existing argument recommendation approaches provide a long list of syntactically correct candidate arguments, which is difficult for software engineers to select the correct arguments from the long list. To this end, we propose a deep learning based approach to recommending arguments instantly when programmers type in method names they intend to invoke. First, we extract context information from a large corpus of opensource applications. Second, we preprocess the extracted dataset, which involves natural language processing and data embedding. Third, we feed the preprocessed dataset to a specially designed convolutional neural network to rank and recommend actual arguments. With the resulting CNN model trained with sample applications, we can sort the candidate arguments in a reasonable order and recommend the first one as the correct argument. We evaluate the proposed approach on 100 open-source Java applications. Results suggest that the proposed approach outperforms the state-of-theart approaches in recommending arguments.

  Keywords

Argument recommendation, Code Completion, CNN, Deep Learning.