A search for the Ten Commentments: An exploratory study on automated quality assessment of comments in Java source code

  • C. Lung

Student thesis: Master's Thesis

Abstract

Context It is not always clear to developers how they should write good comments, nor are there many tools that help developers assess the quality of their comments.
Objective Our goal is to gain better insight into the features that are associated with good source code comments, by developing a predictive model that can automatically assess the quality of comments in a software project.
Method First we derive features that may affect comment quality from scientific literature and compare them with those found in open-source Java projects. We then conduct an online survey among software developers to gather quality ratings for a diverse set of comments, which we use to construct a predictive model for comment quality.
Results Our results suggest that a wide array of features exist for comments, but not all may be equally discernable in open-source projects. Our survey shows that a lot of disagreement exists between different developers about which comments are high-quality, presumably due to factors which cannot be derived from the source code itself. Consequently, our predictive models are only able to partially explain the variance in ratings given by developers.
Conclusion Disagreement among developers about what constitutes a high-quality comment poses challenges for the construction of automated predictive models for comment quality.
Date of Award16 May 2022
Original languageEnglish
SupervisorEbrahim Rahimi (Examiner) & Erik Barendsen (Co-assessor)

Master's Degree

  • Master Software Engineering

Cite this

'