Where should I comment my code? A dataset and model for predicting locations that need comments | IEEE Conference Publication | IEEE Xplore

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


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 More

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/.
Date of Conference: 05-11 October 2020
Date Added to IEEE Xplore: 08 April 2021
ISBN Information:
Conference Location: Seoul, Korea (South)

Funding Agency:


Contact IEEE to Subscribe

References

References is not available for this document.