Do Comments follow Commenting Conventions? A Case Study in Java and Python

Rani, Pooja; Abukar, Suada; Stulova, Nataliia; Bergel, Alexandre; Nierstrasz, Oscar (September 2021). Do Comments follow Commenting Conventions? A Case Study in Java and Python. In: 2021 IEEE 21st International Working Conference on Source Code Analysis and Manipulation (SCAM). Luxembourg. Sept. 27 2021 to Sept. 28 2021. 10.1109/SCAM52516.2021.00028

[img] Text
Rani21f.pdf - Accepted Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (849kB)
[img] Text
Do_Comments_follow_Commenting_Conventions_A_Case_Study_in_Java_and_Python.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (2MB)

Assessing code comment quality is known to be a difficult problem. A number of coding style guidelines have been created with the aim to encourage writing of informative, readable, and consistent comments. However, it is not clear from the research to date which specific aspects of comments the guidelines cover (e.g., syntax, content, structure). Furthermore, the extent to which developers follow these guidelines while writing code comments is unknown. We analyze various style guidelines in Java and Python and uncover that the majority of them address more the content aspect of the comments rather than syntax or formatting, but when considering the different types of information developers embed in comments and the concerns they raise on various online platforms about the commenting practices, existing comment conventions are not yet specified clearly enough, nor do they adequately cover important concerns. Our results highlight the mismatch between developer commenting practices and style guidelines, and provide several focal points for the design and improvement of comment quality checking tools.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued]

UniBE Contributor:

Pooja Rani, Pooja Rani, Abukar, Suada, Stulova, Nataliia, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems

ISBN:

978-1-6654-4897-0

Language:

English

Submitter:

Oscar Nierstrasz

Date Deposited:

24 Feb 2022 11:57

Last Modified:

02 Mar 2023 23:35

Publisher DOI:

10.1109/SCAM52516.2021.00028

Uncontrolled Keywords:

comments snf-asa3 jb22 scg21 scg-pub

BORIS DOI:

10.48350/165154

URI:

https://boris.unibe.ch/id/eprint/165154

Actions (login required)

Edit item Edit item
Provide Feedback