Where should I comment my code? A dataset and model for predicting locations that need comments

Download: PDF, slides (PowerPoint), implementation and dataset.

“Where should I comment my code? A dataset and model for predicting locations that need comments” by Annie Louis, Santanu Kumar Dash, Earl T. Barr, Michael D. Ernst, and Charles Sutton. In ICSE NIER, Proceedings of the 42nd International Conference on Software Engineering, New Ideas and Emerging Results Track, (Seoul, Korea), May 2020, pp. 21-24.

Abstract

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 https://groups.inf.ed.ac.uk/cup/comment-locator/.

Download: PDF, slides (PowerPoint), implementation and dataset.

BibTeX entry:

@inproceedings{LouisDBES2020,
   author = {Annie Louis and Santanu Kumar Dash and Earl T. Barr and
	Michael D. Ernst and Charles Sutton},
   title = {Where should I comment my code? A dataset and model for
	predicting locations that need comments},
   booktitle = {ICSE NIER, Proceedings of the 42nd International
	Conference on Software Engineering, New Ideas and Emerging Results
	Track},
   pages = {21-24},
   address = {Seoul, Korea},
   month = may,
   year = {2020}
}

(This webpage was created with bibtex2web.)

Back to Michael Ernst's publications.