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 ...Show MoreMetadata
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 http://groups.inf.ed.ac.uk/cup/comment-locator/.
Published in: 2020 IEEE/ACM 42nd International Conference on Software Engineering: New Ideas and Emerging Results (ICSE-NIER)
Date of Conference: 05-11 October 2020
Date Added to IEEE Xplore: 08 April 2021
ISBN Information:
Conference Location: Seoul, Korea (South)