RepliComment: Identifying Clones in Code Comments

Blasi, Arianna; Stulova, Nataliia; Gorla, Alessandra; Nierstrasz, Oscar (2021). RepliComment: Identifying Clones in Code Comments. Journal of systems and software, 182, p. 111069. Elsevier 10.1016/j.jss.2021.111069

[img]
Preview
Text
Blas21a-RepliComment.pdf - Submitted Version
Available under License Publisher holds Copyright.

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

Download (585kB) | Preview

Code comments are the primary means to document implementation, and facilitate program comprehension. Thus, their quality should be a primary concern to improve program maintenance. While much effort has been dedicated to detecting bad smells such as clones in code, little work has focused on comments. In this paper we present our solution to detect clones in comments that developers should fix. RepliComment can automatically analyze Java projects and report instances of copy-and-paste errors in comments, and can point developers to which comments should be fixed. Moreover, it can report when clones are signs of poorly written comments. Developers should fix these instances too in order to improve the quality of the code documentation. Our evaluation of ten well-known open source Java projects identified over 11K instances of comment clones, and over 1,300 of them are potentially critical. We improve on our own previous work, which could only find 36 issues in the same dataset. Our manual inspection of 412 issues reported by RepliComment reveals that it achieves a precision of 79% in reporting critical comment clones. The manual inspection of 200 additional comment clones that RepliComment filters out as being legitimate, could not evince any false negative.

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:

Stulova, Nataliia, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems

ISSN:

0164-1212

Publisher:

Elsevier

Language:

English

Submitter:

Oscar Nierstrasz

Date Deposited:

24 Feb 2022 08:45

Last Modified:

05 Dec 2022 16:07

Publisher DOI:

10.1016/j.jss.2021.111069

Uncontrolled Keywords:

scg-pub snf-asa3 scg21 jb22

BORIS DOI:

10.48350/165140

URI:

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

Actions (login required)

Edit item Edit item
Provide Feedback