# Techniques for Calculating Software Product Metrics Threshold Values: A Systematic Mapping Study
## 4 Systematic Mapping Process
### Q1 What Kind of Threshold Calculation Methods Exist in the Literature? In these studies, a variety of threshold calculation methods have been used. We categorized papers into the following categories: programmer experience, statistical properties, quality-related, and review studies, as shown in Table 5.  
Programmer experience: The proposed survivability model by [PERSON] et al. [33] is for object-oriented design, which is aimed to fix the problem of software degradation caused by increasing growth in classes and methods. They proposed a model based on the code rejuvenation technique triggered by a threshold value. [PERSON] and [PERSON] [34] found a positive correlation between source code and bad smells that were identified using programmers' thresholds. Bad smells are considered patterns associated with bad programming practices and bad design decisions. [PERSON] and [PERSON] [35] presented an outlier detection algorithm using object-oriented metrics thresholds. In another paper by [PERSON] et al. [36], the numerical thresholds have been specified for every metric, as given by  
Figure 4: Quality distribution of the selected papers. [PERSON] and [PERSON] [37]. [PERSON] et al. [13] applied clustering algorithms and metrics threshold values for the software fault prediction problem. Statistical properties: [PERSON] et al. [38] compared three methods from [PERSON] et al. [7], [PERSON] et al. [2], and [PERSON] et al. [39] to calculate thresholds for software product lines. Paper [25] aimed to provide a technique to calculate thresholds in the SPL (software product line). The proposed method relies on data analysis and considers the statistical properties of the metrics. [PERSON] et al. [11] defined a data-driven methodology to calculate thresholds. They calculated thresholds using machine learning by dividing the dataset into training set (50%), selection set (25%), and evaluation set (25%). They proposed an algorithm called rectangle learning for calculating the thresholds. [PERSON] et al. [7] designed a method that defines the thresholds of metrics from measurement data with respect to the statistical properties of the metric. [PERSON] [25] used log transformation for metrics thresholds calculation. In this study, all metric data are transformed into a natural log. After that, they are used to calculate the mean and standard deviation to derive thresholds. A statistical model derived from logistic regression (LR) was used in the paper [40] to calculate the OO threshold values. [PERSON] et al. [2] derived the thresholds based on a statistical analysis of the data and commonly used values of thresholds in practice. In their paper of [PERSON] and [PERSON] [41], the logistic regression model was used to derive the metrics threshold value for the identification of bad smells. [PERSON] et al. [42] presented a statistical technique for calculating and evaluating thresholds of object-oriented metrics. In the paper of [PERSON] and [PERSON] [43], the authors used three distribution-based statistical methods, namely adapted distribution-based (ADB), [PERSON] et al. [7], and [PERSON] et al. [38]. [PERSON] et al. 's [17] method selects the threshold value, which has the maximum value for sensitivity and specificity as the threshold value. However, [PERSON] et al. [44] chose the threshold value, which maximizes the area under the ROC curve, and passes from the following three points, namely (0, 0), (1, 1), and (PD, PF). The reason is that there might not always exist a threshold value that maximizes sensitivity and specificity. The other researchers, in their work ([PERSON] and [PERSON], [45]; [PERSON], [46]; [PERSON] et al., [47]; [PERSON], [48]), used the statistical properties of metrics to derive thresholds from a large corpus of systems. [PERSON] [49] applied the benchmarking approach of [PERSON] and [PERSON] [9] to determine thresholds. [PERSON] et al. [50] implemented a threshold calculation tool based on the [PERSON] et al. 's approach [7], [PERSON] et al. [2], [PERSON] et al. [22; 39], and [PERSON] et al. [38] method.