Natural Language Models for Predicting Programming Comments
Dana Movshovitz‐Attias, William W. Cohen · Figshare · 2018
Statistical language models have successfully been used to describe and analyze natural language documents. Recent work applying language models to programming languages is focused on the task of predicting code, while mainly ignoring the prediction of programmer comments. In this work, we predict comments from JAVA source files of open source projects, using topic models and n-grams, and we analyze the performance of the models given varying amounts of background data on the project being predicted. We evaluate models on their comment-completion capability in a setting similar to codecompletion tools built into standard code editors, and show that using a comment completion tool can save up to 47% of the comment typing.
Cited by 100 works. doi:10.1184/r1/6475913 Open-access PDF
Authors
References
- Latent dirichlet allocation
- Finding scientific topics
- Improved backing-off for M-gram language modeling
- Modeling annotated data
- Two decades of statistical language modeling: where do we go from here?
- Mixed-membership models of scientific publications
- On the naturalness of software
- How Many Words Is a Picture Worth? Automatic Caption Generation for News Images
- Towards automatically generating summary comments for Java methods
- Automatic Caption Generation for News Images