Automatic code completion is the task of predicting the next tokens or completing a statement based on a developer’s coding context. Auto-complete methods aim at helping developers accomplish their programming tasks faster and more efficiently through decreasing the effort needed to find and type the next correct tokens. Several studies have shown auto-complete feature is among the most prominent features in IDEs. However, IDEs mostly provide recommendations based on alphabetical or historical order of usage, regardless of the relevance of predictions to the task at hand. Although ML-based models are promising, current research approaches fail to tackle several challenges such as out-of-vocabulary words and long-range dependencies. In this lecture, we will discuss an RNN-based deep model for code completion. We will also discuss when code completion methods fail.


Papers to be discussed in this session are: [1], [2].


V. J. Hellendoorn, S. Proksch, H. C. Gall, and A. Bacchelli, “When code completion fails: A case study on real-world completions,” in Proceedings of the 41st international conference on software engineering, 2019, pp. 960–970.
J. Li, Y. Wang, M. R. Lyu, and I. King, “Code completion with neural attention and pointer networks,” arXiv preprint arXiv:1711.09573, 2017.
S. Luan, D. Yang, K. Sen, and S. Chandra, “Aroma: Code recommendation via structural code search,” arXiv preprint arXiv:1812.01158, 2018.
V. Raychev, M. Vechev, and E. Yahav, “Code completion with statistical language models,” in Acm sigplan notices, 2014, vol. 49, pp. 419–428.
M. Bruch, M. Monperrus, and M. Mezini, “Learning from examples to improve code completion systems,” in Proceedings of the the 7th joint meeting of the european software engineering conference and the ACM SIGSOFT symposium on the foundations of software engineering, 2009, pp. 213–222.
X. Jin and F. Servant, “The hidden cost of code completion: Understanding the impact of the recommendation-list length on its efficiency,” in 2018 IEEE/ACM 15th international conference on mining software repositories (MSR), 2018, pp. 70–73.