{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/deep-learning-to-detect-redundant-method","title":"Deep Learning to Detect Redundant Method Comments","arxiv_id":"1806.04616","date":"2018-06-12","proceeding":null,"authors":["Annie Louis","Santanu Kumar Dash","Earl T. Barr","Charles Sutton"],"abstract":"Comments in software are critical for maintenance and reuse. But apart from\nprescriptive advice, there is little practical support or quantitative\nunderstanding of what makes a comment useful. In this paper, we introduce the\ntask of identifying comments which are uninformative about the code they are\nmeant to document. To address this problem, we introduce the notion of comment\nentailment from code, high entailment indicating that a comment's natural\nlanguage semantics can be inferred directly from the code. Although not all\nentailed comments are low quality, comments that are too easily inferred, for\nexample, comments that restate the code, are widely discouraged by authorities\non software style. Based on this, we develop a tool called CRAIC which scores\nmethod-level comments for redundancy. Highly redundant comments can then be\nexpanded or alternately removed by the developer. CRAIC uses deep language\nmodels to exploit large software corpora without requiring expensive manual\nannotations of entailment. We show that CRAIC can perform the comment\nentailment task with good agreement with human judgements. Our findings also\nhave implications for documentation tools. For example, we find that common\ntags in Javadoc are at least two times more predictable from code than\nnon-Javadoc sentences, suggesting that Javadoc tags are less informative than\nmore free-form comments","url_abs":"http://arxiv.org/abs/1806.04616v1","url_pdf":"http://arxiv.org/pdf/1806.04616v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"deep-learning-to-detect-redundant-method","repo_url":"https://github.com/annieplouis/craic","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"deep-learning","task_name":"Deep Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}