Metric-based rule optimizing system for code smell detection using Salp Swarm and Cockroach Swarm algorithm

Autor: D. Juliet Thessalonica, H. Khanna Nehemiah, S. Sreejith, A. Kannan
Rok vydání: 2022
Předmět:
Zdroj: Journal of Intelligent & Fuzzy Systems. 43:7243-7260
ISSN: 1875-8967
1064-1246
DOI: 10.3233/jifs-220474
Popis: Software developers find it difficult to select the specific detection rules for different smell types. A set of metrics, thresholds and labels constitutes a code smells detection rule. The generated rules must be optimized efficiently to ensure successful rule selection. The objective is to identify how rules are generated from the labeled data set and selected using bio-inspired algorithms. The goals are met by employing the C4.5 and RIPPER algorithms to generate rules then, optimized using two bio-inspired algorithms, the Salp Swarm Algorithm (SSA) and Cockroach Swarm Optimization (CSO). The optimized sets of rules are evaluated using the similarity metrics which are computed with the help of expected and the detected code smells. The common rule subsets from SSA and CSO are merged to produce the optimal rule subset which can be used for code smell detection. The proposed work has been experimented on Xerces-J, Log4J, Gantt Project and JFreeChart dataset. The work detected code smells with an accuracy of 91.7% for Xerces-J, 96.7% for JFreeChart, 88.6% for Gantt Project and 98% for Log4J. The findings will be useful for both theory and research since the proposed framework allows focusing on rule selection.
Databáze: OpenAIRE