Where should I comment my code? A dataset and model for predicting locations that need comments
By Annie Louis, alouis. 2020
8 citations recorded by the source corpus.
Programmers should write code comments, but not on every line of code. We have created a machine learning model that suggests locations where a programmer should write a code comment. We trained it on existing commented code to learn locations that are chosen by developers. Once trained, the model can predict locations in new code. Our models achieved precision of 74% and recall of 13% in identifying comment-worthy locations. This first success opens the door to future work, both in the new where-to-comment problem and in guiding comment generation. Our code and data is available at http://groups.inf.ed.ac.uk/cup/comment-locator/. CCS CONCEPTS • Software and its engineering $\rightarrow$ Maintaining software; • Computing methodologies $\rightarrow$ Neural networks; Natural language processing.
Subfields: Information Systems, Software, Code Generation & Program Synthesis, Program Analysis & Verification
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Carrie J. Cai
- Augustus Odena
- Jacob Austin
- Maarten Bosma
- David Dohan
- Henryk Michalewski
- Maxwell Nye
- Quoc V. Le
In Software
- Augustus Odena
- Henryk Michalewski
- Maarten Bosma
- David Dohan
- Jacob Austin
- Quoc V. Le
- Michael Terry
- Carrie J. Cai
In Code Generation & Program Synthesis
- Charles Sutton
- Augustus Odena
- Quoc V. Le
- Maxwell Nye
- Miltiadis Allamanis
- Premkumar T. Devanbu
- Michael Pradel
- Han Liu
In Program Analysis & Verification
Citations in the corpus
- Program Synthesis with Large Language Models (2021, methodology): “Models trained over natural language and code have been applied within tools for improving comment quality and relevance [Louis et al., 2020, Panthaplackel et al., 2021].”