How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification

Rani, Pooja; Panichella, Sebastiano; Leuenberger, Manuel; Di Sorbo, Andrea; Nierstrasz, Oscar (2021). How to Identify Class Comment Types? A Multi-language Approach for Class Comment Classification. Journal of systems and software, 181, p. 111047. Elsevier 10.1016/j.jss.2021.111047

[img]
Preview
Text
1-s2.0-S0164121221001448-main.pdf - Published Version
Available under License Creative Commons: Attribution-Noncommercial-No Derivative Works (CC-BY-NC-ND).

Download (2MB) | Preview

Most software maintenance and evolution tasks require developers to understand the source code of their software systems. Software developers usually inspect class comments to gain knowledge about program behavior, regardless of the programming language they are using. Unfortunately, (i) different programming languages present language-specific code commenting notations and guidelines; and (ii) the source code of software projects often lacks comments that adequately describe the class behavior, which complicates program comprehension and evolution activities. To handle these challenges, this paper investigates the different language-specific class commenting practices of three programming languages: Python, Java, and Smalltalk. In particular, we systematically analyze the similarities and differences of the information types found in class comments of projects developed in these languages. We propose an approach that leverages two techniques -namely Natural Language Processing and Text Analysis -to automatically identify class comment types, i.e., the specific types of semantic information found in class comments. To the best of our knowledge, no previous work has provided a comprehensive taxonomy of class comment types for these three programming languages with the help of a common automated approach. Our results confirm that our approach can classify frequent class comment information types with high accuracy for the Python, Java, and Smalltalk programming languages. We believe this work can help in monitoring and assessing the quality and evolution of code comments in different programming languages, and thus support maintenance and evolution tasks.

Item Type:

Journal Article (Original Article)

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, Leuenberger, Manuel, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems

ISSN:

0164-1212

Publisher:

Elsevier

Language:

English

Submitter:

Oscar Nierstrasz

Date Deposited:

23 Feb 2022 14:53

Last Modified:

02 Mar 2023 23:35

Publisher DOI:

10.1016/j.jss.2021.111047

Uncontrolled Keywords:

comments scg-pub scg21 jb21 snf-asa3 pharo, Natural language processing technique, Code comment analysis, Software documentation

BORIS DOI:

10.48350/165152

URI:

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

Actions (login required)

Edit item Edit item
Provide Feedback