Please use this identifier to cite or link to this item: https://doi.org/10.21256/zhaw-23353
Publication type: Article in scientific journal
Type of review: Peer review (publication)
Title: What do class comments tell us? : an investigation of comment evolution and practices in Pharo Smalltalk
Authors: Rani, Pooja
Panichella, Sebastiano
Leuenberger, Manuel
Ghafari, Mohammad
Nierstrasz, Oscar
et. al: No
DOI: 10.1007/s10664-021-09981-5
10.21256/zhaw-23353
Published in: Empirical Software Engineering
Volume(Issue): 26
Issue: 6
Page(s): 112
Issue Date: 2021
Publisher / Ed. Institution: Springer
ISSN: 1382-3256
1573-7616
Language: English
Subjects: Commenting practice; Class comment analysis; Comment evolution; Template analysis; Pharo; Program comprehension
Subject (DDC): 005: Computer programming, programs and data
Abstract: Context: Previous studies have characterized code comments in various programming languages, showing how high quality of code comments is crucial to support program comprehension activities, and to improve the effectiveness of maintenance tasks. However, very few studies have focused on understanding developer practices to write comments. None of them has compared such developer practices to the standard comment guidelines to study the extent to which developers follow the guidelines. Objective: Therefore, our goal is to investigate developer commenting practices and compare them to the comment guidelines. Method: This paper reports the first empirical study investigating commenting practices in Pharo Smalltalk. First, we analyze class comment evolution over seven Pharo versions. Then, we quantitatively and qualitatively investigate the information types embedded in class comments. Finally, we study the adherence of developer commenting practices to the official class comment template over Pharo versions. Results: Our results show that there is a rapid increase in class comments in the initial three Pharo versions, while in subsequent versions developers added comments to both new and old classes, thus maintaining a similar code to comment ratio. We furthermore found three times as many information types in class comments as those suggested by the template. However, the information types suggested by the template tend to be present more often than other types of information. Additionally, we find that a substantial proportion of comments follow the writing style of the template in writing these information types, but they are written and formatted in a non-uniform way. Conclusion: The results suggest the need to standardize the commenting guidelines for formatting the text, and to provide headers for the different information types to ensure a consistent style and to identify the information easily. Given the importance of high quality code comments, we draw numerous implications for developers and researchers to improve the support for comment quality assessment tools.
URI: https://digitalcollection.zhaw.ch/handle/11475/23353
Fulltext version: Published version
License (according to publishing contract): CC BY 4.0: Attribution 4.0 International
Departement: School of Engineering
Organisational Unit: Institute of Applied Information Technology (InIT)
Appears in collections:Publikationen School of Engineering

Files in This Item:
File Description SizeFormat 
2021_Rani-etal_What-do-class-comments-tell-us.pdf4.64 MBAdobe PDFThumbnail
View/Open
Show full item record
Rani, P., Panichella, S., Leuenberger, M., Ghafari, M., & Nierstrasz, O. (2021). What do class comments tell us? : an investigation of comment evolution and practices in Pharo Smalltalk. Empirical Software Engineering, 26(6), 112. https://doi.org/10.1007/s10664-021-09981-5
Rani, P. et al. (2021) ‘What do class comments tell us? : an investigation of comment evolution and practices in Pharo Smalltalk’, Empirical Software Engineering, 26(6), p. 112. Available at: https://doi.org/10.1007/s10664-021-09981-5.
P. Rani, S. Panichella, M. Leuenberger, M. Ghafari, and O. Nierstrasz, “What do class comments tell us? : an investigation of comment evolution and practices in Pharo Smalltalk,” Empirical Software Engineering, vol. 26, no. 6, p. 112, 2021, doi: 10.1007/s10664-021-09981-5.
RANI, Pooja, Sebastiano PANICHELLA, Manuel LEUENBERGER, Mohammad GHAFARI und Oscar NIERSTRASZ, 2021. What do class comments tell us? : an investigation of comment evolution and practices in Pharo Smalltalk. Empirical Software Engineering. 2021. Bd. 26, Nr. 6, S. 112. DOI 10.1007/s10664-021-09981-5
Rani, Pooja, Sebastiano Panichella, Manuel Leuenberger, Mohammad Ghafari, and Oscar Nierstrasz. 2021. “What Do Class Comments Tell Us? : An Investigation of Comment Evolution and Practices in Pharo Smalltalk.” Empirical Software Engineering 26 (6): 112. https://doi.org/10.1007/s10664-021-09981-5.
Rani, Pooja, et al. “What Do Class Comments Tell Us? : An Investigation of Comment Evolution and Practices in Pharo Smalltalk.” Empirical Software Engineering, vol. 26, no. 6, 2021, p. 112, https://doi.org/10.1007/s10664-021-09981-5.


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.