Just-In-Time Obsolete Comment Detection and Update
Open accessThe DOI matches its Crossref record; 3 of the 3 references it cites were found in a registry or an index.
Abstract
Comments are valuable resources for the development, comprehension and maintenance of software. However, while changing code, developers sometimes neglect the evolution of the corresponding comments, resulting in obsolete comments. Such obsolete comments can mislead developers and introduce bugs in the future, and are therefore detrimental. We notice that by detecting and updating obsolete comments in time with code changes, obsolete comments can be effectively reduced and even avoided. We refer to this task as Just-In-Time (JIT) Obsolete Comment Detection and Update. In this work, we propose a two-stage framework namedCUP$^\mathrm{2}$2(Two-stageCommentUPdater) to automate this task. CUP$^\mathrm{2}$consists two components, i.e., anObsoleteCommentDetector namedOCDand aCommentUPdater namedCUP, each of which relies on a distinct neural network model to perform detection (updates). Specifically, given a code change and a corresponding comment, CUP$^\mathrm{2}$first leverages OCD to predict whether this comment should be updated. If the answer is yes, CUP will be used to generate the new version of the comment automatically. To evaluate CUP$^\mathrm{2}$, we build a large-scale dataset with over 4 million code-comment change samples. Our dataset focuses on method-level code changes and updates on method header comments considering the importance and widespread use of such comments. Evaluation results show that 1) both OCD and CUP outperform their baselines by significant margins, and 2) CUP$^\mathrm{2}$performs better than a rule-based baseline. Specifically, the comments generated by CUP$^\mathrm{2}$are identical to the ground truth for 41.8% of the samples that are predicted to be positive by OCD. We believe CUP$^\mathrm{2}$can help developers detect obsolete comments, better understand where and how to update obsolete comments and reduce their edits on obsolete comment updates.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Get To The Point: Summarization with Pointer-Generator Networks
See, A., Liu, P. J., & Manning, C. D. (2017) · Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p17-1099 · Cited by 3,775
Towards automatically generating summary comments for Java methods
Sridhara, G., Hill, E., Muppaneni, D., Pollock, L., & Vijay-Shanker, K. (2010) · Proceedings of the IEEE/ACM international conference on Automated software engineering · doi:10.1145/1858996.1859006 · Cited by 514 · cited 2×
“Many previous works proposed to generate code comments using rule-based and IR-based methods [34], [35], [36], [37], [38].”
MethodAutomating just-in-time comment updating
Liu, Z., Xia, X., Yan, M., & Li, S. (2020) · Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3324884.3416581 · Cited by 56
Self-citation
Research works printed but not linked: 61
- 10.1109/ICSE.2009.5070533 · DOI · Paper page
- 10.1109/ICPC.2013.6613836 · DOI · Paper page
- 10.1007/s10664-019-09694-w · DOI · Paper page
- Woodfield, The effect of modularization and comments on program comprehension, 215
- 10.1145/1083142.1083152 · DOI · Paper page
- 10.1145/1085313.1085331 · DOI · Paper page
- Tan, HotComments: How to make program comments more useful?, 1
- 10.1145/1294261.1294276 · DOI · Paper page
- 10.1007/978-3-642-15187-3_8 · DOI
- 10.1109/ICST.2012.106 · DOI · Paper page
- 10.1016/j.jss.2011.09.019 · DOI
- 10.1145/1985793.1985796 · DOI · Paper page
- 10.1145/2856636.2856638 · DOI
- 10.1109/ASE.2017.8115624 · DOI · Paper page
- 10.1109/COMPSAC.2018.00028 · DOI · Paper page
- Hu, Deep code comment generation, 200
- 10.1109/ICSE.2019.00021 · DOI · Paper page
- 10.1109/ASE.2019.00026 · DOI · Paper page
- 10.1145/3134667 · DOI
- 10.18653/v1/P18-1097 · DOI
- 10.1609/aaai.v32i1.12069 · DOI · Paper page
- 10.3115/v1/p15-2097 · DOI
- 10.1145/1137983.1138030 · DOI · Paper page
- 10.1109/WCRE.2007.21 · DOI · Paper page
- 10.1007/s11219-009-9075-x · DOI
- 10.1109/ASE.2015.67 · DOI
- 10.1109/ICPC.2019.00019 · DOI · Paper page
- 10.1109/ICSE.2017.11 · DOI · Paper page
- 10.1109/ICSM.2008.4658065 · DOI · Paper page
- 10.18653/v1/2020.acl-main.168 · DOI · Paper page
- 10.1109/ICPC.2013.6613830 · DOI · Paper page
- 10.1109/WCRE.2010.13 · DOI · Paper page
- 10.1109/SANER.2015.7081848 · DOI · Paper page
- 10.1007/s11390-016-1671-1 · DOI
- 10.18653/v1/P16-1195 · DOI · Paper page
- 10.1145/3238147.3238206 · DOI · Paper page
- 10.1109/ICSE.2019.00087 · DOI · Paper page
- 10.1007/s10664-019-09730-9 · DOI · Paper page
- 10.1016/j.jss.2019.07.087 · DOI
- 10.1145/3434280 · DOI
- Karampatsis, Big code!= big vocabulary: Open-vocabulary models for source code, 1073
- Yin, Learning to represent edits, 1
- Grave, Learning word vectors for 157 languages, 3483
- 10.18653/v1/D15-1166 · DOI · Paper page
- 10.1145/318372.318577 · DOI · Paper page
- 10.1145/2642937.2642982 · DOI · Paper page
- Levenshtein, 1966, Binary codes capable of correcting deletions, insertions, and reversals, Soviet Phys. Doklady, 10, 707
- 10.1109/ICSE.2009.5070531 · DOI · Paper page
- 10.1145/1806799.1806847 · DOI · Paper page
- 10.1145/3180155.3180206 · DOI · Paper page
- Pedregosa, 2011, Scikit-learn: Machine learning in python, J. Mach. Learn. Res., 12, 2825
- 10.1145/3238147.3238190 · DOI · Paper page
- 10.3115/1073083.1073135 · DOI · Paper page
- Kingma, Adam: A method for stochastic optimization, 1
- 10.1007/978-1-4612-4380-9_16 · DOI · Paper page
- 10.4324/9781315806730 · DOI · Paper page
- 10.1109/ICCV.2017.324 · DOI · Paper page
- Casas, Intentnet: Learning to predict intention from raw sensor data, 947
- 10.18653/v1/P18-1158 · DOI
- 10.1109/CVPR.2018.00981 · DOI · Paper page
- Gao, Automating the removal of obsolete todo comments, 1
Cited by
CCT5: A Code-Change-Oriented Pre-trained Model
Lin, B., Wang, S., Liu, Z., Liu, Y., Xia, X., & Mao, X. (2023) · Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3611643.3616339 · Cited by 69
Self-citationExploring the Capabilities of LLMs for Code-Change-Related Tasks
Fan, L., Liu, J., Liu, Z., Lo, D., Xia, X., & Li, S. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3709358 · Cited by 41
“Finally, we present the implementation of the work in Section 2.6.”
InfluentialSelf-citationFrom Today's Code to Tomorrow's Symphony: The AI Transformation of Developer's Routine by 2030
Qiu, K., Puccinelli, N., Ciniselli, M., & Di Grazia, L. (2024) · arXiv · doi:10.48550/arxiv.2405.12731 · Cited by 22
Identifying Multi-parameter Constraint Errors in Python Data Science Library API Documentation
Xu, X., Xie, F., Zhu, C., Bai, G., Khurshid, S., & Li, Y. (2025) · Proceedings of the ACM on Software Engineering · doi:10.1145/3728945 · Cited by 1
Metadata
- Authors
- Liu, Z., Xia, X., Lo, D., Yan, M., & Li, S.
- Venue
- IEEE Transactions on Software Engineering
- Published
- 2023-01-01
- Volume
- 49
- Issue
- 1
- Pages
- 1-23
- ISSN
- 0098-5589 (ISSN-L)
- 1939-3520
- 2326-3881
- OpenAlex
- W4206738852
- Cited by
- 33
- References
- 3
- FWCI
- 4.73
- Type
- journal article
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Just-In-Time Obsolete Comment Detection and Update. https://app.cochat.ai/papers/10.1109/tse.2021.3138909
- The paper
- Liu, Z., Xia, X., Lo, D., Yan, M., & Li, S. (2023). Just-In-Time Obsolete Comment Detection and Update. IEEE Transactions on Software Engineering. https://doi.org/10.1109/tse.2021.3138909
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.