Thresholds Derivation of Software Code Metrics for God Class Detection Using Metaheuristic Approaches
Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Code smell is an indicator of the suboptimal design of the source code. The presence of code smell in the source code signifies that the developer has not given utmost attention while designing the source code, which may result in a high maintenance cost for the software. Detection of these smells is crucial in the early phase of software development to reduce maintenance costs. Out of all code smells, the God class is the most prominently studied and considered undesirable from an object-oriented design perspective. This paper proposes a detection technique for God-class smell based on the threshold of software metrics. The paper finds four metrics relevant to God class detection based on the AUC score. Various methods can detect God-class code smell, but we have opted for a threshold detection method due to its ease of automation and faster speed. We have derived thresholds of software metrics (CK metrics) for God class detection using metaheuristic optimizers. The optimizers include genetic algorithms, particle swarm optimizers, differential evolution, and artificial bee colony optimizers. The proposed technique has been tested on sixteen open-source object-oriented Java projects. Results show that the artificial bee colony optimizer yields better results than other used optimizers.