Code completion with neural attention and pointer networks

125Citations
Citations of this article
133Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Intelligent code completion has become an essential research task to accelerate modern software development. To facilitate effective code completion for dynamically-typed programming languages, we apply neural language models by learning from large codebases, and develop a tailored attention mechanism for code completion. However, standard neural language models even with attention mechanism cannot correctly predict the outof-vocabulary (OoV) words that restrict the code completion performance. In this paper, inspired by the prevalence of locally repeated terms in program source code, and the recently proposed pointer copy mechanism, we propose a pointer mixture network for better predicting OoV words in code completion. Based on the context, the pointer mixture network learns to either generate a withinvocabulary word through an RNN component, or regenerate an OoV word from local context through a pointer component. Experiments on two benchmarked datasets demonstrate the effectiveness of our attention mechanism and pointer mixture network on the code completion task.

Cite

CITATION STYLE

APA

Li, J., Wang, Y., Lyu, M. R., & King, I. (2018). Code completion with neural attention and pointer networks. In IJCAI International Joint Conference on Artificial Intelligence (Vol. 2018-July, pp. 4159–4165). International Joint Conferences on Artificial Intelligence. https://doi.org/10.24963/ijcai.2018/578

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free