Taxonomy of inline code comment smells

Available
The embargo period has ended, and this item is now available.

Date

2022-07

Editor(s)

Advisor

Tüzün, Eray

Supervisor

Co-Advisor

Co-Supervisor

Instructor

BUIR Usage Stats
15
views
76
downloads

Series

Abstract

Code comments play a vital role in source code comprehension and software maintainability. It is common for developers to write comments to explain a code snippet, and commenting code is generally considered as a good practice in soft-ware engineering. However, low-quality comments can have a detrimental effect on software quality or be ineffective for code understanding. In this study, we conducted a multivocal literature review and created a taxonomy of inline code comments smells consisting of 11 types. Afterward, we manually labeled 2447 inline comments from eight open-source projects where half of them were Java, and another half were Python projects. We found out that the smells exist in both Java and Python projects with varying degrees. Moreover, we conducted an online survey with 41 software practitioners to learn their opinions on these smells and their effect on code comprehension and software maintainability. The survey respondents generally agreed with the taxonomy; however, they reported that some smell types might have a positive effect on code comprehension in certain scenarios. Additionally, using our labeled dataset, we developed various machine learning-based models to categorize the smell types automatically. Our best model achieved an F1 score of 0.53. We share our manually labeled dataset online and provide implications of this study for software engineering practition-ers, researchers, and educators.

Source Title

Publisher

Course

Other identifiers

Book Title

Degree Discipline

Computer Engineering

Degree Level

Master's

Degree Name

MS (Master of Science)

Citation

Published Version (Please cite this version)

Language

English

Type