Majumdar, S. orcid.org/0000-0003-3935-4087, Bansal, A., Das, P.P. et al. (3 more authors) (2022) Automated evaluation of comments to aid software maintenance. Journal of Software, 34 (7). e2463. ISSN: 2047-7473
Abstract
Approaches to evaluate comments based on whether they increase code comprehensibility for software maintenance tasks are important, but largely missing. We pro-pose Comment Probe for automated classification and quality evaluation of codecomments of C codebases based on how they can help to understand existing code.We conduct surveys and document developers' perceptions on the type of com-ments that prove useful to maintaining software in the form of comment categories.A total of 20,206 comments have been collected from open-source Github projects and annotated with assistance from industry experts. We develop features to semantically analyze comments to locate concepts related to categories of usefulness. Additionally, features based on code and comment correlation are designed to infer whether the comment is also consistent and not superfluous. Using neural networks,comments are classified as useful, partially useful, and not useful with precision andrecall scores of 86.27% and 86.42%, respectively. The proposed framework for com-ment quality evaluation incorporates industry practices and adds significant value to companies wanting to formulate better code commenting strategies. Furthermore,large codebases can be de-cluttered by removing comments not helpful in maintaining code.
Metadata
| Item Type: | Article |
|---|---|
| Authors/Creators: |
|
| Keywords: | code comprehension; comment quality; knowledge graph; machine learning; ontology |
| Dates: |
|
| Institution: | The University of Leeds |
| Academic Units: | The University of Leeds > Faculty of Engineering & Physical Sciences (Leeds) > School of Computing (Leeds) |
| Date Deposited: | 09 Feb 2026 10:05 |
| Last Modified: | 09 Feb 2026 16:37 |
| Published Version: | https://onlinelibrary.wiley.com/doi/10.1002/smr.24... |
| Status: | Published |
| Publisher: | Wiley |
| Identification Number: | 10.1002/smr.2463 |
| Related URLs: | |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:237542 |

CORE (COnnecting REpositories)
CORE (COnnecting REpositories)