A Severity Assessment of Python Code Smells

Presence of code smells complicate the source code and can obstruct the development and functionality of the software project. As they represent improper behavior that might have an adverse effect on software maintenance, code smells are behavioral in nature. Python is widely used for various softwa...

Full description

Saved in:
Bibliographic Details
Published inIEEE access Vol. 11; p. 1
Main Authors Gupta, Aakanshi, Gandhi, Rashmi, Jatana, Nishtha, Jatain, Divya, Panda, Sandeep Kumar, Ramesh, Janjhyam Venkata Naga
Format Journal Article
LanguageEnglish
Published Piscataway IEEE 01.01.2023
The Institute of Electrical and Electronics Engineers, Inc. (IEEE)
Subjects
Online AccessGet full text
ISSN2169-3536
2169-3536
DOI10.1109/ACCESS.2023.3327553

Cover

More Information
Summary:Presence of code smells complicate the source code and can obstruct the development and functionality of the software project. As they represent improper behavior that might have an adverse effect on software maintenance, code smells are behavioral in nature. Python is widely used for various software engineering activities and tends tool to contain code smells that affect its quality. This study investigates five code smells diffused in 20 Python software comprising 10550 classes and analyses its severity index using metric distribution at the class level. Subsequently, a behavioral analysis has been conducted over the considered modification period (phases) for the code smell undergoing class change proneness. Furthermore, it helps to investigate the accurate multinomial classifier for mining the severity index. It witnesses the change in severity at the class level over the modification period by mapping its characteristics over various statistical functions and hypotheses. Our findings reveal that the Cognitive Complexity of code smell is the most severe one. The remaining four smells are centered around the moderate range, having an average severity index value. The results suggest that the J48 algorithm was the accurate multinomial classifier for classifying the severity of code smells with 92.98% accuracy in combination with the AdaBoost method. The findings of our empirical evaluation can be beneficial for the software developers to prioritize the code smells in the pre-refactoring phase and can help manage the code smells in forthcoming releases, subsequently saving ample time and resources spent in the development and maintenance of software projects.
Bibliography:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ISSN:2169-3536
2169-3536
DOI:10.1109/ACCESS.2023.3327553