Skip to main content

Automatic Quality Assessment of Source Code Comments: The JavadocMiner

  • Conference paper
Natural Language Processing and Information Systems (NLDB 2010)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 6177))

  • 1646 Accesses

Abstract

An important software engineering artefact used by developers and maintainers to assist in software comprehension and maintenance is source code documentation. It provides insights that help software engineers to effectively perform their tasks, and therefore ensuring the quality of the documentation is extremely important. Inline documentation is at the forefront of explaining a programmer’s original intentions for a given implementation. Since this documentation is written in natural language, ensuring its quality needs to be performed manually. In this paper, we present an effective and automated approach for assessing the quality of inline documentation using a set of heuristics, targeting both quality of language and consistency between source code and its comments. We apply our tool to the different modules of two open source applications (ArgoUML and Eclipse), and correlate the results returned by the analysis with bug defects reported for the individual modules in order to determine connections between documentation and code quality.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Fluri, B., Würsch, M., Gall, H.: Do Code and Comments Co-Evolve? On the Relation between Source Code and Comment Changes. In: WCRE, pp. 70–79 (2007)

    Google Scholar 

  2. Nurvitadhi, E., Leung, W.W., Cook, C.: Do class comments aid Java program understanding? Frontiers in Education (FIE) 1 (November 2003)

    Google Scholar 

  3. Padioleau, Y., Tan, L., Zhou, Y.: Listening to programmers Taxonomies and characteristics of comments in operating system code. In: ICSE 2009, Washington, DC, USA, pp. 331–341. IEEE Computer Society, Los Alamitos (2009)

    Google Scholar 

  4. Knuth, D.E.: Literate Programming. The Computer Journal 27(2), 97–111 (1984)

    Article  MATH  Google Scholar 

  5. Brooks, R.E.: Towards a Theory of the Comprehension of Computer Programs. International Journal of Man-Machine Studies 18(6), 543–554 (1983)

    Article  MathSciNet  Google Scholar 

  6. Kramer, D.: API documentation from source code comments: a case study of Javadoc. In: SIGDOC 1999: Proceedings of the 17th annual international conference on Computer documentation, pp. 147–153. ACM, New York (1999)

    Chapter  Google Scholar 

  7. van Heesch, D.: Doxygen (2010), http://www.stack.nl/~dimitri/doxygen/

  8. Lehman, M.M., Belady, L.A. (eds.): Program evolution: processes of software change. Academic Press Professional, Inc., San Diego (1985)

    Google Scholar 

  9. Schreck, D., Dallmeier, V., Zimmermann, T.: How documentation evolves over time. In: IWPSE 2007: Ninth international workshop on Principles of software evolution, pp. 4–10. ACM, New York (2007)

    Google Scholar 

  10. Sun Microsystems: How to Write Doc Comments for the Javadoc Tool, http://java.sun.com/j2se/javadoc/writingdoccomments/

  11. DuBay, W.H.: The Principles of Readability. Impact Information (2004)

    Google Scholar 

  12. Khamis, N., Witte, R., Rilling, J.: Generating an NLP Corpus from Java Source Code: The SSL Javadoc Doclet. In: New Challenges for NLP Frameworks (2010)

    Google Scholar 

  13. Cunningham, H., Maynard, D., Bontcheva, K., Tablan, V.: GATE: A framework and graphical development environment for robust NLP tools and applications. In: Proc. of the 40th Anniversary Meeting of the ACL (2002)

    Google Scholar 

  14. Ryan, K., Fast, G.: Java Fathom, http://www.representqueens.com/fathom/

  15. Witte, R., Khamis, N., Rilling, J.: Flexible Ontology Population from Text: The OwlExporter. In: Int. Conf. on Language Resources and Evaluation, LREC (2010)

    Google Scholar 

  16. Buse, R.P.L., Weimer, W.R.: A metric for software readability. In: ISSTA 2008: Proceedings of the 2008 international symposium on Software testing and analysis, pp. 121–130. ACM, New York (2008)

    Chapter  Google Scholar 

  17. Abebe, S.L., Haiduc, S., Marcus, A., Tonella, P., Antoniol, G.: Analyzing the Evolution of the Source Code Vocabulary. In: European Conference on Software Maintenance and Reengineering, pp. 189–198 (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Khamis, N., Witte, R., Rilling, J. (2010). Automatic Quality Assessment of Source Code Comments: The JavadocMiner. In: Hopfe, C.J., Rezgui, Y., Métais, E., Preece, A., Li, H. (eds) Natural Language Processing and Information Systems. NLDB 2010. Lecture Notes in Computer Science, vol 6177. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13881-2_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-13881-2_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-13880-5

  • Online ISBN: 978-3-642-13881-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics