/*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
RacerX: effective, static detection of race conditions and deadlocks
Engler, D., & Ashcraft, K. (2003) · ACM SIGOPS Operating Systems Review · doi:10.1145/1165389.945468 · Cited by 661
Summarizing Scientific Articles: Experiments with Relevance and Rhetorical Status
Teufel, S., & Moens, M. (2002) · Computational Linguistics · doi:10.1162/089120102762671936 · Cited by 638
Foundations of statistical natural language processing
Weikum, G. (2002) · ACM SIGMOD Record · doi:10.1145/601858.601867 · Cited by 615
Knowledge Discovery and Data Mining: Challenges and Realities
(2007) · IGI Global eBooks · doi:10.4018/978-1-59904-252-7 · Cited by 601
Performance debugging for distributed systems of black boxes
Aguilera, M. K., Mogul, J. C., Wiener, J. L., Reynolds, P., & Muthitacharoen, A. (2003) · ACM SIGOPS Operating Systems Review · doi:10.1145/1165389.945454 · Cited by 558
Protecting privacy using the decentralized label model
Myers, A. C., & Liskov, B. (2000) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/363516.363526 · Cited by 556
Li, Z., & Zhou, Y. (2005) · Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineering · doi:10.1145/1081706.1081755 · Cited by 428
Self-citationPi: a path identification mechanism to defend against DDoS attacks
Yaar, A., Perrig, A., & Song, D. (2004) · Proceedings 19th International Conference on Data Engineering (Cat. No.03CH37405) · doi:10.1109/secpri.2003.1199330 · Cited by 415
Leino, K. R. M. (1998) · Programming Concepts and Methods PROCOMET ’98 · doi:10.1007/978-0-387-35358-6_1 · Cited by 393
RacerX: effective, static detection of race conditions and deadlocks
Engler, D., & Ashcraft, K. (2003) · Proceedings of the nineteenth ACM symposium on Operating systems principles · doi:10.1145/945445.945468 · Cited by 368
Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects
Choi, J.-D., Burke, M., & Carini, P. R. (1993) · ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) · doi:10.1145/158511.158639 · Cited by 362
CMC: a pragmatic approach to model checking real code
Musuvathi, M., Park, D. Y. W., Chou, A., Engler, D. R., & Dill, D. L. (2002) · ACM SIGOPS Operating Systems Review · doi:10.1145/844128.844136 · Cited by 361
Debugging operating systems with time-traveling virtual machines
King, S. T., Dunlap, G. W., & Chen, P. M. (2005) · Cited by 334
Performance debugging for distributed systems of black boxes
Aguilera, M. K., Mogul, J. C., Wiener, J. L., Reynolds, P., & Muthitacharoen, A. (2003) · Proceedings of the nineteenth ACM symposium on Operating systems principles · doi:10.1145/945445.945454 · Cited by 334
A cross-collection mixture model for comparative text mining
Zhai, C., Velivelli, A., & Yu, B. (2004) · Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining · doi:10.1145/1014052.1014150 · Cited by 272
The Use of Classifiers in Sequential Inference
Punyakanok, V., & Roth, D. (2001) · arXiv (Cornell University) · doi:10.48550/arxiv.cs/0111003 · Cited by 168
From uncertainty to belief: inferring the specification within
Kremenek, T., Twohey, P., Back, G., Ng, A. Y., & Engler, D. (2006) · doi:10.5555/1298455.1298471 · Cited by 150
The effect of modularization and comments on program comprehension
Woodfield, S. N., Dunsmore, H. E., & Shen, V. Y. (1981) · doi:10.5555/800078.802534 · Cited by 131
Examining the evolution of code comments in PostgreSQL
Jiang, Z. M., & Hassan, A. E. (2006) · Proceedings of the 2006 international workshop on Mining software repositories · doi:10.1145/1137983.1138030 · Cited by 81
Pulse: a dynamic deadlock detection mechanism using speculative execution
Li, T., Ellis, C. S., Lebeck, A. R., & Sorin, D. J. (2005) · USENIX Annual Technical Conference · Cited by 71
Ying, A. T. T., Wright, J. L., & Abrams, S. (2005) · ACM SIGSOFT Software Engineering Notes · doi:10.1145/1082983.1083152 · Cited by 67
A Sequential Model for Multi-Class ClassificationPreprint
Even-Zohar, Y., & Roth, D. (2001) · arXiv (Cornell University) · doi:10.48550/arxiv.cs/0106044 · Cited by 63
Ying, A. T. T., Wright, J. L., & Abrams, S. (2005) · Proceedings of the 2005 international workshop on Mining software repositories - MSR '05 · doi:10.1145/1083142.1083152 · Cited by 42
Proceedings of the 2001 Conference on Empirical Methods in Natural Language Processing
Koehn, P., & Knight, K. K. (2001) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · Cited by 39
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).”
Method
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.