/*icomment: bugs or bad comments?*/
The DOI matches its Crossref record; 34 of the 34 references it cites were found in a registry or an index.
Abstract
Commenting source code has long been a common practice in software development. Compared to source code, comments are more direct, descriptive and easy-to-understand. Comments and sourcecode provide relatively redundant and independent information regarding a program's semantic behavior. As software evolves, they can easily grow out-of-sync, indicating two problems: (1) bugs -the source code does not follow the assumptions and requirements specified by correct program comments; (2) bad comments - comments that are inconsistent with correct code, which can confuse and mislead programmers to introduce bugs in subsequent versions. Unfortunately, as most comments are written in natural language, no solution has been proposed to automatically analyze commentsand detect inconsistencies between comments and source code. This paper takes the first step in automatically analyzing commentswritten in natural language to extract implicit program rulesand use these rules to automatically detect inconsistencies between comments and source code, indicating either bugs or bad comments. Our solution, iComment, combines Natural Language Processing(NLP), Machine Learning, Statistics and Program Analysis techniques to achieve these goals. We evaluate iComment on four large code bases: Linux, Mozilla, Wine and Apache. Our experimental results show that iComment automatically extracts 1832 rules from comments with 90.8-100% accuracy and detects 60 comment-code inconsistencies, 33 newbugs and 27 bad comments, in the latest versions of the four programs. Nineteen of them (12 bugs and 7 bad comments) have already been confirmed by the corresponding developers while the others are currently being analyzed by the developers.
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
Data Mining: Practical Machine Learning Tools and Techniques
(2011) · Elsevier eBooks · doi:10.1016/c2009-0-19715-5 · Cited by 25,437
(1992) · Cited by 23,431
Foundations of statistical natural language processing
Manning, C. D., & Schütze, H. (1999) · Cited by 9,816
Witten, I. H. (2008) · Cited by 9,143
Proceedings of the International Joint Conference on Artificial Intelligence 2007
Bundy, A. (2007) · International Joint Conference on Artificial Intelligence · Cited by 2,761
A Maximum Entropy Model for Part-Of-Speech Tagging
Ratnaparkhi, A. (1996) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · Cited by 1,589
Eraser: a dynamic data race detector for multithreaded programs
Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., & Anderson, T. (1997) · ACM Transactions on Computer Systems · doi:10.1145/265924.265927 · Cited by 1,572
Points-to analysis in almost linear time
Steensgaard, B. (1996) · Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '96 · doi:10.1145/237721.237727 · Cited by 1,088
Bugs as deviant behavior: a general approach to inferring errors in systems code
Engler, D., Chen, D. Y., Hallem, S., Chou, A., & Chelf, B. (2001) · Proceedings of the eighteenth ACM symposium on Operating systems principles · doi:10.1145/502034.502041 · Cited by 737
Research works printed but not linked: 12
- 10.1145/337180.337240 · doi:10.1145/337180.337240
- 10.1109/52.976940 · doi:10.1109/52.976940
- 10.1145/512529.512539 · doi:10.1145/512529.512539
- 10.1109/32.44365 · doi:10.1109/32.44365
- 10.5555/1247360.1247361 · doi:10.5555/1247360.1247361
- T. Li , C. Ellis , A. Lebeck , and D. Sorin . On-demand and semantic-free dynamic deadlock detection with speculative execution . In USENIX Annual Technical Conference , 2005 . T. Li, C. Ellis, A. Lebeck, and D. Sorin. On-demand and semantic-free dynamic deadlock detection with speculative execution. In USENIX Annual Technical Conference, 2005.
- T. Mitchell . Machine Learning . McGraw Hill , 1997 . T. Mitchell. Machine Learning. McGraw Hill, 1997.
- 10.5555/1060289.1060297 · doi:10.5555/1060289.1060297
- 10.1145/168619.168630 · doi:10.1145/168619.168630
- N. Sterling . WARLOCK -- A static data race analysis tool . In USENIX Winter Technical Conference , pages 97 -- 106 , 1993 . N. Sterling. WARLOCK -- A static data race analysis tool. In USENIX Winter Technical Conference, pages 97--106, 1993.
- 10.5555/829515.830562 · doi:10.5555/829515.830562
- F. Zhou , J. Condit , Z. Anderson , I. Bagrak , R. Ennals , M. Harren , G. Necula , and E. Brewer . SafeDrive: Safe and recoverable extensions using language-based techniques . In Proceedings of the 7th Symposium on Operating System Design and Implementation , 2006 . F. Zhou, J. Condit, Z. Anderson, I. Bagrak, R. Ennals, M. Harren, G. Necula, and E. Brewer. SafeDrive: Safe and recoverable extensions using language-based techniques. In Proceedings of the 7th Symposium on Operating System Design and Implementation, 2006.
Cited by
Detecting large-scale system problems by mining console logs
Xu, W., Huang, L., Fox, A., Patterson, D., & Jordan, M. I. (2009) · Proceedings of the ACM SIGOPS 22nd symposium on Operating systems principles · doi:10.1145/1629575.1629587 · Cited by 1,332
“proposed a novel approach to detect inconsistencies between textual comments and the program logic [31].”
Checking app behavior against app descriptions
Gorla, A., Tavecchia, I., Gross, F., & Zeller, A. (2014) · Proceedings of the 36th International Conference on Software Engineering · doi:10.1145/2568225.2568276 · Cited by 397
An Exploratory Study on Self-Admitted Technical Debt
Potdar, A., & Shihab, E. (2014) · 2014 IEEE International Conference on Software Maintenance and Evolution · doi:10.1109/icsme.2014.31 · Cited by 281
@tComment: Testing Javadoc Comments to Detect Comment-Code Inconsistencies
Tan, S. H., Marinov, D., Tan, L., & Leavens, G. T. (2012) · 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation · doi:10.1109/icst.2012.106 · Cited by 197
“However, automating such checking is challenging because it requires automated understanding of the natural-language text in the comments.”
BackgroundSelf-citationIdentifying self-admitted technical debt in open source projects using text mining
Huang, Q., Shihab, E., Xia, X., Lo, D., & Li, S. (2018) · Empirical Software Engineering · doi:10.1007/s10664-017-9522-4 · Cited by 194
“…et al. proposed a tool called iComment to automatically analyze comments written in natural language to extract implicit program rules, and then they use these rules to automatically detect inconsistencies between comments and source code, indicating either bugs or bad comments (Tan et al. 2007).”
MethodInferring Resource Specifications from Natural Language API Documentation
Zhong, H., Zhang, L., Xie, T., & Mei, H. (2009) · 2009 IEEE/ACM International Conference on Automated Software Engineering · doi:10.1109/ase.2009.94 · Cited by 190
“[37] propose iComment that extracts rules from rule-containing comments in source files.”
BackgroundMethodInfluentialExamining the Impact of Self-Admitted Technical Debt on Software Quality
Wehaibi, S., Shihab, E., & Guerrouj, L. (2016) · 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER) · doi:10.1109/saner.2016.72 · Cited by 114
A Large-Scale Empirical Study on Code-Comment Inconsistencies
Wen, F., Nagy, C., Bavota, G., & Lanza, M. (2019) · 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC) · doi:10.1109/icpc.2019.00019 · Cited by 105
DocTer: documentation-guided fuzzing for testing deep learning API functions
Xie, D., Li, Y., Kim, M., Pham, H. V., Tan, L., Zhang, X., & Godfrey, M. W. (2022) · Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis · doi:10.1145/3533767.3534220 · Cited by 81
Self-citationSecurity Smells in Ansible and Chef Scripts: A Replication Study
Rahman, A., Rahman, M. R., Parnin, C., & Williams, L. (2021) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3408897 · Cited by 80
Automating 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
“Despite the value of comments, developers may forget or ignore the updates of comments when changing source code [43, 50], which may bring in inconsistent or obsolete comments (aka., bad comments) [43, 44, 50].”
BackgroundPredictive Comment Updating With Heuristics and AST-Path-Based Neural Learning: A Two-Phase Approach
Lin, B., Wang, S., Liu, Z., Xia, X., & Mao, X. (2023) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2022.3185458 · Cited by 27
“source code during software evolution [15], [16], [17], [18].”
BackgroundGenerating Unit Tests for Documentation
Nassif, M., Hernandez, A., Sridharan, A., & Robillard, M. P. (2022) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2021.3087087 · Cited by 22
“The difficulty of maintaining high-quality documentation [5], [21], [22], [23] led to a vast exploration of automated documentation generation approaches [24].”
BackgroundLeveraging Large Language Model to Assist Detecting Rust Code Comment Inconsistency
Zhang, Y., Liu, Z., Feng, Y., & Xu, B. (2024) · Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/3691620.3695010 · Cited by 10
Deep Just-In-Time Consistent Comment Update via Source Code Changes
Guo, S., Xu, X., Li, H., & Chen, R. (2022) · 2022 IEEE 13th International Symposium on Parallel Architectures, Algorithms and Programming (PAAP) · doi:10.1109/paap56126.2022.10010469 · Cited by 3
Deep Just-In-Time Inconsistency Detection Between Comments and Source Code
Panthaplackel, S., Li, J. J., Gligoric, M., & Mooney, R. J. (2021) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v35i1.16119 · Cited by 2
Metadata
- Authors
- Tan, L., Yuan, D., Krishna, G., & Zhou, Y.
- Venue
- Proceedings of twenty-first ACM SIGOPS symposium on Operating systems principles
- Publisher
- ACM
- Published
- 2007-10-14
- Pages
- 145-158
- OpenAlex
- W2152874840
- Cited by
- 268
- References
- 34
- FWCI
- 4.60
- Type
- conference paper
- Language
- en
- Open access
- closed
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
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.