What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk.

Saved in:
Bibliographic Details
Title: What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk.
Authors: Rani, Pooja1 pooja.rani@inf.unibe.ch, Panichella, Sebastiano2, Leuenberger, Manuel1, Ghafari, Mohammad3, Nierstrasz, Oscar1
Source: Empirical Software Engineering. Nov2021, Vol. 26 Issue 6, p1-49. 49p.
Subjects: Smalltalk (Computer program language), Computer software, Programming languages, Design templates, Information retrieval
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. [ABSTRACT FROM AUTHOR]
Copyright of Empirical Software Engineering is the property of Springer Nature and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)
Database: Engineering Source
FullText Text:
  Availability: 0
Header DbId: egs
DbLabel: Engineering Source
An: 151976760
AccessLevel: 6
PubType: Academic Journal
PubTypeId: academicJournal
PreciseRelevancyScore: 0
IllustrationInfo
Items – Name: Title
  Label: Title
  Group: Ti
  Data: What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk.
– Name: Author
  Label: Authors
  Group: Au
  Data: <searchLink fieldCode="AR" term="%22Rani%2C+Pooja%22">Rani, Pooja</searchLink><relatesTo>1</relatesTo><i> pooja.rani@inf.unibe.ch</i><br /><searchLink fieldCode="AR" term="%22Panichella%2C+Sebastiano%22">Panichella, Sebastiano</searchLink><relatesTo>2</relatesTo><br /><searchLink fieldCode="AR" term="%22Leuenberger%2C+Manuel%22">Leuenberger, Manuel</searchLink><relatesTo>1</relatesTo><br /><searchLink fieldCode="AR" term="%22Ghafari%2C+Mohammad%22">Ghafari, Mohammad</searchLink><relatesTo>3</relatesTo><br /><searchLink fieldCode="AR" term="%22Nierstrasz%2C+Oscar%22">Nierstrasz, Oscar</searchLink><relatesTo>1</relatesTo>
– Name: TitleSource
  Label: Source
  Group: Src
  Data: <searchLink fieldCode="JN" term="%22Empirical+Software+Engineering%22">Empirical Software Engineering</searchLink>. Nov2021, Vol. 26 Issue 6, p1-49. 49p.
– Name: Subject
  Label: Subjects
  Group: Su
  Data: <searchLink fieldCode="DE" term="%22Smalltalk+%28Computer+program+language%29%22">Smalltalk (Computer program language)</searchLink><br /><searchLink fieldCode="DE" term="%22Computer+software%22">Computer software</searchLink><br /><searchLink fieldCode="DE" term="%22Programming+languages%22">Programming languages</searchLink><br /><searchLink fieldCode="DE" term="%22Design+templates%22">Design templates</searchLink><br /><searchLink fieldCode="DE" term="%22Information+retrieval%22">Information retrieval</searchLink>
– Name: Abstract
  Label: Abstract
  Group: Ab
  Data: 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. [ABSTRACT FROM AUTHOR]
– Name: AbstractSuppliedCopyright
  Label:
  Group: Ab
  Data: <i>Copyright of Empirical Software Engineering is the property of Springer Nature and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract.</i> (Copyright applies to all Abstracts.)
PLink https://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=egs&AN=151976760
RecordInfo BibRecord:
  BibEntity:
    Identifiers:
      – Type: doi
        Value: 10.1007/s10664-021-09981-5
    Languages:
      – Code: eng
        Text: English
    PhysicalDescription:
      Pagination:
        PageCount: 49
        StartPage: 1
    Subjects:
      – SubjectFull: Smalltalk (Computer program language)
        Type: general
      – SubjectFull: Computer software
        Type: general
      – SubjectFull: Programming languages
        Type: general
      – SubjectFull: Design templates
        Type: general
      – SubjectFull: Information retrieval
        Type: general
    Titles:
      – TitleFull: What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk.
        Type: main
  BibRelationships:
    HasContributorRelationships:
      – PersonEntity:
          Name:
            NameFull: Rani, Pooja
      – PersonEntity:
          Name:
            NameFull: Panichella, Sebastiano
      – PersonEntity:
          Name:
            NameFull: Leuenberger, Manuel
      – PersonEntity:
          Name:
            NameFull: Ghafari, Mohammad
      – PersonEntity:
          Name:
            NameFull: Nierstrasz, Oscar
    IsPartOfRelationships:
      – BibEntity:
          Dates:
            – D: 01
              M: 11
              Text: Nov2021
              Type: published
              Y: 2021
          Identifiers:
            – Type: issn-print
              Value: 13823256
          Numbering:
            – Type: volume
              Value: 26
            – Type: issue
              Value: 6
          Titles:
            – TitleFull: Empirical Software Engineering
              Type: main
ResultId 1