A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique.

Sci Rep

(Computer Science), DST - Centre for Interdisciplinary Mathematical Sciences, Institute of Science, Banaras Hindu University, Varanasi, India.

Published: September 2023

Detecting code smells may be highly helpful for reducing maintenance costs and raising source code quality. Code smells facilitate developers or researchers to understand several types of design flaws. Code smells with high severity can cause significant problems for the software and may cause challenges for the system's maintainability. It is quite essential to assess the severity of the code smells detected in software, as it prioritizes refactoring efforts. The class imbalance problem also further enhances the difficulties in code smell severity detection. In this study, four code smell severity datasets (Data class, God class, Feature envy, and Long method) are selected to detect code smell severity. In this work, an effort is made to address the issue of class imbalance, for which, the Synthetic Minority Oversampling Technique (SMOTE) class balancing technique is applied. Each dataset's relevant features are chosen using a feature selection technique based on principal component analysis. The severity of code smells is determined using five machine learning techniques: K-nearest neighbor, Random forest, Decision tree, Multi-layer Perceptron, and Logistic Regression. This study obtained the 0.99 severity accuracy score with the Random forest and Decision tree approach with the Long method code smell. The model's performance is compared based on its accuracy and three other performance measurements (Precision, Recall, and F-measure) to estimate severity classification models. The impact of performance is also compared and presented with and without applying SMOTE. The results obtained in the study are promising and can be beneficial for paving the way for further studies in this area.

Download full-text PDF

Source
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC10533884PMC
http://dx.doi.org/10.1038/s41598-023-43380-8DOI Listing

Publication Analysis

Top Keywords

code smell
20
code smells
20
smell severity
16
class imbalance
12
code
11
severity
9
imbalance problem
8
machine learning
8
severity detection
8
feature selection
8

Similar Publications

Currently, people spend a lot of time using their mobile devices. With such ubiquity of mobile devices in our daily life, battery capacity and quality are of utmost importance. Running software applications (called apps) are one of the major factors influencing the power consumption in mobile devices.

View Article and Find Full Text PDF

Human olfactory perception embeds fine temporal resolution within a single sniff.

Nat Hum Behav

November 2024

State Key Laboratory of Brain and Cognitive Science, Institute of Psychology, Chinese Academy of Sciences, Beijing, China.

A sniff in humans typically lasts one to three seconds and is commonly considered to produce a long-exposure shot of the chemical environment that sets the temporal limit of olfactory perception. To break this limit, we devised a sniff-triggered apparatus that controls odorant deliveries within a sniff with a precision of 18 milliseconds. Using this apparatus, we show through rigorous psychophysical testing of 229 participants (649 sessions) that two odorants presented in one order and its reverse become perceptually discriminable when the stimulus onset asynchrony is merely 60 milliseconds (Cohen's d = 0.

View Article and Find Full Text PDF

Olfactory perception begins when odorous substances interact with specialized receptors located on the surface of dedicated sensory neurons. The recognition of smells depends on a complex mechanism involving a combination of interactions between an odorant and a set of odorant receptors (ORs), where molecules are recognized according to a combinatorial activation code of ORs. Although these interactions have been studied for decades, the rules governing this ligand recognition remain poorly understood, and the complete combinatorial code is only known for a handful of odorants.

View Article and Find Full Text PDF

Dynamic stacking ensemble for cross-language code smell detection.

PeerJ Comput Sci

August 2024

Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia.

Code smells refer to poor design and implementation choices by software engineers that might affect the overall software quality. Code smells detection using machine learning models has become a popular area to build effective models that are capable of detecting different code smells in multiple programming languages. However, the process of building of such effective models has not reached a state of stability, and most of the existing research focuses on Java code smells detection.

View Article and Find Full Text PDF

Odor information arrives first in the main olfactory bulb and is then broadcasted to the olfactory cortices and striatum. Downstream regions have unique cellular and connectivity architectures that may generate different coding patterns to the same odors. To reveal region-specific response features, tuning and decoding of single-unit populations, we recorded responses to the same odors under the same conditions across regions, namely, the main olfactory bulb (MOB), the anterior olfactory nucleus (AON), the anterior piriform cortex (aPC), and the olfactory tubercle of the ventral striatum (OT), of awake male mice.

View Article and Find Full Text PDF

Want AI Summaries of new PubMed Abstracts delivered to your In-box?

Enter search terms and have AI summaries delivered each week - change queries or unsubscribe any time!