Code Smells detection using ensemble feature selection methods and wrapper techniques based on neural network.

Document Type : Original Article

Authors

1 Master's student, Imam Hossein University -Tehran-Iran

2 Assistant Professor, Imam Hossein University, Tehran, Iran

3 Researcher, Imam Hossein University, Tehran, Iran

Abstract

Software code refactoring is one of the effective methods to enhance software quality, which has a direct relationship with the code smells of the software. Code smell is a superficial symptom that may indicate a deeper problem in the application. Code smell hinders the path of maintenance, development and evolution of the program. Advanced defense is a set of technologies and systems designed to counter modern and advanced security threats. It encompasses a set of measures such as secure design, the use of appropriate architectural patterns, and avoiding unnecessary complexities in software code. Most studies have utilized open-source software in the Java programming language, whereas newer and more modern software projects tend to lean towards Python. Therefore, in this paper, a neural network-based approach with a new feature selection method including the use of ensemble feature selection methods and wrapper techniques, has been presented to predict software code smells in the Python programming language. The code smells mentioned in the software include long method, long parameter list, large class, long base class list and long scope chaining. Also, the genetic algorithm and the gray wolf optimizer are the desired wrapper techniques, and information gain, information gain ratio and chi-square are the three algorithms used in the ensemble feature selection. The final and main goal of this paper, which is to improve software quality by early prediction of code smells using a desirable feature selection method in the source code of the program with Python language, has been realized with the help of the proposed method and performance improvement of 1 to 7 percent has been obtained.

Keywords

Main Subjects


Smiley face

 

Volume 15, Issue 3 - Serial Number 57
Autumn
November 2024
Pages 189-207
  • Receive Date: 10 July 2024
  • Revise Date: 20 September 2024
  • Accept Date: 11 October 2024
  • Publish Date: 22 October 2024