Do Bad Smells Lead to Defects?

Yükleniyor...
Küçük Resim

Tarih

Dergi Başlığı

Dergi ISSN

Cilt Başlığı

Yayıncı

Institute of Electrical and Electronics Engineers Inc.

Erişim Hakkı

info:eu-repo/semantics/closedAccess

Özet

Code that disregards fundamental sound design practices is said to 'smell.' While a code smell is not normally a bug, conventional wisdom suggests that it could lead to bugs when the software is later modified. This makes logical sense, but is there empirical evidence that supports this argument? If code smells can be shown to metastasize over time, are there some code smells that more virulent than others? We set out to address these questions by examining five popular Python open-source software projects to determine if recorded defects traced back to segments of code containing a smell. Our study focused on eight code smells: Large Class, Long Parameter List, Feature Envy, Parallel Inheritance Hierarchy, Data Class, Lazy Class, Refused Bequest, and Long Method. We analyzed GitHub change and defect logs for defects, then identified how the code as repaired. A smell was assumed to be the cause of the defect if changes resulted in removal of the smell. We counted the number of code smells in the project and used the ratio of the count of smells to the count of defects to quantify the influence of smells on defects. Our results indicate that the Long Parameter List code smell has the highest positive correlation, the Long Method and Large Class smells have a moderate correlation, and the Parallel Inheritance Hierarchy, Data Class, Lazy Class, Feature Envy and Refused Bequest smells have no significant correlation on the presence of defects. © 2023 IEEE.

Açıklama

13th International Conference on Software Technology and Engineering, ICSTE 2023 -- 27 October 2023 through 29 October 2023 -- Virtual, Online -- 195880

Anahtar Kelimeler

code smells, object-oriented design metrics, open-source software, software engineering

Kaynak

Proceedings - 2023 13th International Conference on Software Technology and Engineering, ICSTE 2023

WoS Q Değeri

Scopus Q Değeri

Cilt

Sayı

Künye

Onay

İnceleme

Ekleyen

Referans Veren