Károly Nehéz
University of Miskolc

Published : 2 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 2 Documents
Search

Deep convolutional neural network model for bad code smells detection based on oversampling method Nasraldeen Alnor Adam Khleel; Károly Nehéz
Indonesian Journal of Electrical Engineering and Computer Science Vol 26, No 3: June 2022
Publisher : Institute of Advanced Engineering and Science

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.11591/ijeecs.v26.i3.pp1725-1735

Abstract

Code smells refers to any symptoms or anomalies in the source code that shows violation of design principles or implementation. Early detection of bad code smells improves software quality. Nowadays several artificial neural network (ANN) models have been used for different topics in software engineering: software defect prediction, software vulnerability detection, and code clone detection. It is not necessary to know the source of the data when using ANN models but require large training sets. Data imbalance is the main challenge of artificial intelligence techniques in detecting the code smells. To overcome these challenges, the objective of this study is to presents deep convolutional neural network (D-CNN) model with synthetic minority over-sampling technique (SMOTE) to detect bad code smells based on a set of Java projects. We considered four code-smell datasets which are God class, data class, feature envy and long method and the results were compared based on different performance measures. Experimental results show that the proposed model with oversampling techniques can provide better performance for code smells detection and prediction results can be further improved when the model is trained with more datasets. Moreover, more epochs and hidden layers help increase the accuracy of the model.
Detection of code smells using machine learning techniques combined with data-balancing methods Nasraldeen Alnor Adam Khleel; Károly Nehéz
International Journal of Advances in Intelligent Informatics Vol 9, No 3 (2023): November 2023
Publisher : Universitas Ahmad Dahlan

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.26555/ijain.v9i3.981

Abstract

Code smells are prevalent issues in software design that arise when implementation or design principles are violated. These issues manifest as symptoms or anomalies in the source code. Timely identification of code smells plays a crucial role in enhancing software quality and facilitating software maintenance. Previous studies have shown that code smell detection can be accomplished through the utilization of machine learning (ML) methods. However, despite their increasing popularity, research suggests that the suitability of these methods are not always appropriate due to the problem of imbalanced data. Consequently, the effectiveness of ML models may be negatively affected. This study aims to propose a novel method for detecting code smells by employing five ML algorithms, namely decision tree (DT), k-nearest neighbors (K-NN), support vector machine (SVM), XGboost (XGB), and multi-layer perceptron (MLP). Additionally, to tackle the challenge of imbalanced data, the proposed method incorporates the random oversampling technique. Experiments were conducted in this study using four datasets that encompassed code smells, specifically god-class, data-class, long-method, and feature-envy. The experimental outcomes were evaluated and compared using various performance metrics. Upon comparing the outcomes of our models on both the balanced and original datasets, we found that the XGB model achieved the highest accuracy of 100% for detecting the data class and long method on the original datasets. In contrast, the highest accuracy of 100% was obtained for the data class and long method using DT, SVM, and XGB models on the balanced datasets. According to the empirical findings, there is significant promise in using ML techniques for the accurate prediction of code smells.