A method to prediction of software system’s code smells using neural network

Document Type : Original Article

Authors

1 Computer Engineering, Faculty of Computer Science, Imam Hossein University, Tehran, Iran

2 Department of Computer Education, Computer Faculty, Imam Hossein University, Tehran, Iran

Abstract

Software engineers are always looking to reduce production costs and increase software quality. There are various methods to improve software quality, and code refactoring is one of these methods. Code refactoring and reorganization is a method for cleaning up software code and is one of the crucial processes in maintaining software quality. One of the main challenges in developing and producing clean code in software is the existence of inconsistent or bad-smelling code. Code smell is a superficial sign in the code that may indicate a deeper problem in the software. The existence of code smells may slow down processing, increase the risk of failure, as well as software errors. Therefore, software developers attempt to identify inconsistent code and facilitate its maintainability and scalability by refactoring software code. However, manual and automatic identification of code smells is challenging and tiring. As a result, methods for identifying such codes automatically and semi-automatically have been proposed. An important note in non-automatic methods is that predicting inconsistent code requires individual knowledge that is both time-consuming and increases the possibility of error. Therefore, automated methods have a greater advantage in predicting inconsistent code. So far, extensive research has been conducted on automatic prediction and identification of inconsistent code. A high percentage of these studies have focused on predicting four types of code smells: long method, feature envy, god class, and data class. In this article, our focus is on improving the accuracy of extracting such inconsistent codes. One of the common methods for predicting this type of code is using machine learning-based methods. Artificial neural networks are a specific type of machine learning algorithm that is modeled according to the human brain's performance method. This means that these networks can learn from input data and provide responses in the form of predictions and classifications. In this article, a multi-layer neural network was used to predict software inconsistent code, as well as a new feature selection method to increase prediction accuracy.

Keywords


Smiley face

  • Receive Date: 22 February 2023
  • Revise Date: 12 July 2023
  • Accept Date: 31 July 2023
  • Publish Date: 28 September 2023