AbstractContext 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 Award||16 May 2022|
|Supervisor||Ebrahim Rahimi (Examiner) & Erik Barendsen (Co-assessor)|
- Master Software Engineering