University of Surrey

Test tubes in the lab Research in the ATI Dance Research

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

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

[img]
Preview
Text
Where should I comment my code - A dataset and model for predicting locations that need comments - AAM.pdf - Accepted version Manuscript

Download (450kB) | Preview

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/.

Item Type: Conference or Workshop Item (Conference Paper)
Divisions : Faculty of Engineering and Physical Sciences > Computer Science
Authors :
NameEmailORCID
Louis, Annie
Dash, Santanu Kumars.dash@surrey.ac.uk
Barr, Earl T.
Ernst, Michael D.
Sutton, Charles
Date : 2020
DOI : 10.1145/3377816.3381736
Copyright Disclaimer : © 2020 Copyright held by the owner/author(s). Publication rights licensed to ACM.
Uncontrolled Keywords : NLP; Natural language processing; Comments
Related URLs :
Depositing User : Clive Harris
Date Deposited : 14 May 2020 15:51
Last Modified : 14 May 2020 16:07
URI: http://epubs.surrey.ac.uk/id/eprint/856826

Actions (login required)

View Item View Item

Downloads

Downloads per month over past year


Information about this web site

© The University of Surrey, Guildford, Surrey, GU2 7XH, United Kingdom.
+44 (0)1483 300800