Do code and comments co-evolve? On the relation between source code and comment changes

  • Fluri B
  • Würsch M
  • Gall H
  • 63

    Readers

    Mendeley users who have this article in their library.
  • 78

    Citations

    Citations of this article.

Abstract

Comments are valuable especially for program understanding and maintenance, but do developers comment their code? To which extent do they add comments or adapt them when they evolve the code? We examine the question whether source code and associated comments are really changed together along the evolutionary history of a software system. In this paper, we describe an approach to map code and comments to observe their co-evolution over multiple versions. We investigated three open source systems (i.e., ArgoUML, Azureus, and JDT core) and describe how comments and code co-evolved over time. Some of our findings show that: 1) newly added code - despite its growth rate - barely gets commented; 2) class and method declarations are commented most frequently but far less, for example, method calls; and 3) that 97% of comment changes are done in the same revision as the associated source code change.

Get free article suggestions today

Mendeley saves you time finding and organizing research

Sign up here
Already have an account ?Sign in

Find this document

Authors

  • Beat Fluri

  • Michael Würsch

  • Harald C. Gall

Cite this document

Choose a citation style from the tabs below

Save time finding and organizing research with Mendeley

Sign up for free