Can We Automatically Generate Class Comments in Pharo?

Rani, Pooja; Bergel, Alexandre; Hess, Lino; Kehrer, Timo; Nierstrasz, Oscar (2022). Can We Automatically Generate Class Comments in Pharo? In: IWST'22: Proceedings of International Workshop on Smalltalk Technologies. Novi Sad, Serbia.

[img]
Preview
Text
Rani22b.pdf - Accepted Version
Available under License Creative Commons: Attribution (CC-BY).

Download (569kB) | Preview
[img]
Preview
Text
Rani22b.pdf - Published Version
Available under License Creative Commons: Attribution (CC-BY).

Download (569kB) | Preview

Code comments support developers in understanding and maintaining codebases. Specifically in the Pharo environment, code comments serve as the main form of code documentation and usually convey information ranging from high-level design descriptions to low-level implementation details. Nevertheless, numerous important classes in Pharo still lack comments as developers find writing comments to be a tedious and effort-intensive task. Previous works in Java have recommended generating comments automatically to reduce commenting effort and save developers time. There exist several approaches to achieve this goal. One such popular approach is based on identifying stereotypes, \ie a generalized set of characteristics supposed to represent an entity (object, class). However, this approach has not been tested for other programming languages. In this paper, we adopt the stereotype-based approach to automatically generate class comments in the Pharo programming environment. Specifically, we generated information about the class type, collaborators and key methods. We surveyed seven developers to evaluate the generated comments for 24 classes. The responses suggest that, although more information could be added to the comments, the generated class comments are readable and understandable, and the majority of comments do not contain unnecessary information.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

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

UniBE Contributor:

Pooja Rani, Pooja Rani, Bergel, Alexandre Henri, Kehrer, Timo Benjamin, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems

Language:

English

Submitter:

Oscar Nierstrasz

Date Deposited:

15 Aug 2022 14:00

Last Modified:

04 Mar 2024 11:59

Uncontrolled Keywords:

scg22 scg-pub jb22 snf-asa3 MISSING-DOI

BORIS DOI:

10.48350/171930

URI:

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

Actions (login required)

Edit item Edit item
Provide Feedback