# A Comprehensive MCDM-Based Approach for Object-Oriented Metrics Selection Problems
## 1 Introduction  
Software quality is a measure of how well a software product meets the needs and expectations of its users. High-quality software is free from defects and errors that could affect its functionality or performance. It is more reliable and less likely to fail or cause errors, and easier to maintain and update, reducing the risk of bugs over time. One important issue in software engineering is to find code smells in software before its delivery. In fact, defect prediction is a technique to control the schedule and cost of a software system. Detecting and fixing OOP defects early in the development cycle can save time and money by reducing the need for expensive rework or corrective action later in the project [1]. Code smells [2; 3; 4] refer to any symptom in the object-oriented program that possibly hinders software maintenance and evolution. The textual description of defects or code smells is very subjective and depends on the designer/programmer interpretation. Asan example, we can present the defect _Feature Entry_ (i.e., this happens when a method is defined in a wrong class based on the class attributes and other method invocation). Depending on a subjective interpretation, each designer could decide in a different way which methods are candidates to present a _Feature Envy_ defect. In fact, the selection of those methods is based on information such as \"The number of communications with a given class\". Depending on the context, the same value could be evaluated as high, medium, or even low. One approach that has gained popularity for detecting design defects is to use the object-oriented metrics. In [5], the authors presented an overview of 3295 papers extracted from the most popular electronic databases related to the UML model-refactoring field. Seventeen percent of the studies used OO metrics and rules-based metrics to detect design defects. Unfortunately, a single metric may not be sufficient to capture all aspects of the system's quality, and it may lead to incomplete or inaccurate assessments of the system's overall quality, but a combination of metrics is a powerful heuristic that can identify and standardize the way of defining and detecting code smells. The majority of works in literature focuses on combining metrics, generating a set of detection rules; they use standard object-oriented metrics as well as metrics defined in an ad hoc way [6; 7; 8]. The accuracy of rule-based metrics is directly affected by the selected metrics. Defining object-oriented rule-based metrics can be challenging. Not only does it require a thorough understanding of OOP concepts and their relationship with software quality attributes, but it also depends on the selection of rules with the best metrics as well as the best thresholds for each metric. The complexity of this combinatory problem is significantly reduced when the number of metrics involved for the detection rule decreases. In fact, there is no standard set of object-oriented rule-based metrics that everyone agrees upon. This can make it difficult to compare software systems using different metrics. The problem of the metrics selection is, by excellence, a Multi-Criteria Decision-Making (MCDM) problem if we consider the huge number of possibilities and combinations between the metrics and thresholds. Researchers are facing a challenge in the selection of metrics and the definition of the respective thresholds. They have the challenge to find the most relevant set of rules-based metrics. In this paper, we propose to use the fuzzy decision-making trial and evaluation laboratory (DEMATEL) method to determine the most influential criteria and to find out the ranking of those criteria [9; 10; 11]. The goal of this work is to reduce the number of metrics combinations leading to rules that are more accurate. This paper answers the question: \"What is the best set of rules that can detect a specific defect?\" Only rules with the most relevant metrics are considered.