Multiclass Software Bug Severity Classification using Decision Tree, Naive Bayes and Bagging

Article History: Received: 10 November 2020; Revised: 12 January 2021; Accepted: 27 January 2021; Published online: 05 April 2021 Abstract: The software applications are experiencing the challenges of ever-growing complexity caused by the increase in the number of bugs. The software development process has been adversely affected due to the wastage of resources caused due to the bugs. It is imperative to identify and predict bugs to facilitate the software development process. Software bugs can be classified according to the severity of the bugs. In this paper a comparative analysis of Decision Tree, Naïve Bayes and Bagging approach is done for the bug severity classification. A comparative analysis of the Naïve Bayes, Decision Tree and Bagging approach is done for the accuracy, precision, recall and F-measure parameters


Introduction
Quality Assurance (QA) is an activity that performs an essential role in software engineering. QA administers the software project to ensure that the final product or the software application meets the expectations of the end users. To judge the software quality, testing (quality assurance activity) is required. Testing is a time and efforts taken process. Several bugs remain uncovered even after rigorous testing using test cases. Main reason of these uncovers bugs is lack of time. The huge measure of information is gathered day by day. The enormous issue with this huge measure of information is in dissecting the information. This huge volume of information is broke down utilizing the data mining (Kumar& Sharma, 2016; Kumar & Kumar, 2015). So, for saving cost, time and efforts, there is a need to focus on this area. (Kumar, Singla, Yadav, & Kumar, 2019) have noticed that detection of bugs using traditional ways is efforts intensive and costly. In this work, main focus was on awareness of important reasons of bugs in software application. The developer and the tester need to rationalize the coding efforts at an opportune time so that reasons causing bugs are essentially identified. Historical data is always for the prediction. The process of software development attaches high importance to prediction of software bugs. Several bug indicators as the model input can be used with prediction models for predicting the number of bugs. A comprehensive list of bug indicators using prediction models can significantly improve the quality of software products. There is a growing need for improving the quality of software applications with judicious utilization of bug prediction approaches. To avoid the possible harms of software products, bug severity needs to be identified. An attempt has been made for correlating levels of inheritance using the neural network with the severities of the bugs.

Objectives
1. To identify important reasons of software bugs that impact software quality. 2. To classify the software bugs w.r.t severity using Naïve Bayes, Decision Tree and Bagging approach. 3. To analyses the Bagging and Decision Tree approach for software bug classification.

Literature Review
First of all the in (Yuen, 1985) extended data over a time of 19 months and concerned bugs in a large software system have been gathered and, after classification in different ways, broke down utilizing both parametric and nonparametric factual strategies. Different tests were applied: auto-and cross-relationships between the announcing of bugs and the reactions to these were examined, time arrangement models were made, and so on Important experiences about the transformative conduct of large software during upkeep and about the support cycle itself were acquired. Expected value of the instruments utilized for checking and dealing with the cycle are talked about.
(Zhenmin , Lin, Xuanhui, Shan, Yuanyuan , & Chengxiang , 2006) successfully configuration instruments and backing for identifying and recuperating from programming disappointments requires a profound comprehension of bug qualities. As of late, programming and its advancement interaction have essentially changed from numerous points of view, including more assistance from bug identification apparatuses, move towards multi-stringing design, the open-source improvement worldview and expanding worries about security and easy to understand interface. Accordingly, results from past investigations may not be material to introduce programming. To explore the effects of the new factors on programming mistakes, investigate bug attributes by first testing many true bugs in two enormous, agent open-source projects. Author (Stefan, 2008) inferred that classifications are halfway comparable yet additionally contain varieties and none of which is acknowledged as a fundamental device in programming projects. The creator sums up the work on bug classifications up until now, proposes a bunch of difficulties and the course to an answer.
According to (Wahyudin, Ramler, & Biffl, 2011) various organizations have been using numerous statistical techniques for making the prediction. However, such type prediction has not been holistically examined, supported by different bug indicators and machine learning methods.
Mende and Koschke (Mende & Koschke, 2009) have stated that for increasing the accuracy, number of parameters to identify the bug reasons can be increased. In their study they have proved that increase in the number of parameters with data from relevant entities may illustrate statistically significant results. This study has included more number of parameters to identify main reasons of bugs and light is thrown on reasons attached to product, process and project. Author (Arya, Kumar , & Singh, 2020) proposed a model in which machine learning approach is used for bug prediction. (Q., Liu, & Illahi, 2020) stated that huge number of bug report frequently received by software systems. A methodology proposed in which initially apply common language preparing strategies to preprocess textual data of bug reports and transfer this data into vectors on the basis of semantic and syntactic associations. In the secondary phase, the software engineering area specific emotion analysis for bug report performed and using the software engineering domain repository emotion value is computed. ) said that the primary goal, according to the researchers, is to create an intelligent classifier adept of predicting the severity. Train a number of discriminative models based on this data that will be used for automated bug report labeling and severity prediction. When it comes to automatic marking, the precision is about 91 percent. Kumar, R. et. al (Kumar, Singla, Yadav, & Kumar, 2019) exposed the hidden information in the bug repository may be extracted using different data mining techniques. Ni, Z. et.al (Ni, Li, Sun, Chen, Tang, & Shi, 2020) aimed at spontaneously classifying defect into their root cause categories by using the associated connection among defect fixes and defect causes. To begin, the code-related bug classification criteria in terms of the bug's cause is defined. The results of the experiment show that there is an empirical connection between the bug fix and the cause of historical bugs, and that the prophecy is right.
Zhang, T. et.al (Zhang, Chen, Yang, & Zhu, 2020) expressed that data-driven and supervised models are not capable to provide the desired result if the sufficient training data is not available. An incremental learning based framework propsed to for tracking the unlabeled bug reports and for training augmentation method used.
Prabha, C. L., et.al (Prabha & Shivakumar, 2020) exposed that while contributing to industrial results the observable outcomes are provided by software defect prediction . The developers get the help in identifying bugs from development faults predicting defective code areas. Using the parameters precision, recall, accuracy etc., a research analysis is conducted and results are compared.
Most of the researches have worked for bug severity classification using machine learning, but still lot of work can be done in the for bug classification using machine learning

Need of Study
The researchers have highlighted the following needs after conducting an general review of existing research literature: • The prevention of software failures needs to be achieved by paying more attention to potential bug-prone areas.
• The quality of the project needs to be improved through rigorous shortlisting of bug indicators.
• Almost one third of the total cost of software development is required in testing. So, with the help of the machine learning techniques for defect prediction cost may be decreased.

Naïve Bayes:
This approach dependent on the Bayes' hypothesis. . Bayesian is normally known as Bayes Classifier. In this approach idea of likelihood is utilized to group the information things. It is essentially utilized for text characterization. In the arrangement issue there are number of traits and classes say, C1, C2, … ., CK. In this approach property estimations (a1,a2, … . an) portray each instance say x and from the arrangement of values qualities V, any worth can be taken by the objective capacity f(x). The Bayesian Classifier get the best plausible estimation of the objective capacity with the mean to characterize the new coming case (Kumar, Singla, Yadav, & Kumar, 2019).

Decision Tree:
A very simple method used for data mining is the decision tree method. Decision tree is appropriate for the exploratory knowledge discovery. The leaf node of the decision tree represents the class label. Decision tree in the above diagram shows the concept, how likely a customer buys a laptop from an electronic shop. Greedy approach is used for constructing decision trees in these algorithms (Kumar, Singla, Yadav, & Kumar, 2019). .

Bagging:
If dealing with a classification or regression problem, when we train a model, a function that takes an input, returns an output, and is represented with respect to the training dataset. To suit models that are nearly independent, we rely on the strong 'approximate properties' of bootstrap samples. (Yates & Islam, 2021).

Analysis and Result
A comparative analysis of the Naïve Byes, Decision Tree and Bagging approach is done for the bug severity classification of the Jira bug repository. The data set of the bug is taken from the kaggle. A multiclass classification is done for the bug severity is done using Naïve Bayes, Decision Tree and Bagging approach. Different classes of the bug severity are mentioned in the below table. In the Table 1, five levels of the severity mentioned. In this paper bug severity classification is done for the severity levels S5, S4, S3 and S2 suing the Decision Tree, Naïve Bayes and Bagging approaches. Accuracy of 84%, 83% and 67% observed using Bagging, Decision tree and Naïve Bayes approach respectively as shown in the Figure 1.

Figure 1. Comparison of Accuracy
A comparative analysis for the precision, recall and f-measure is also done as shown in the Table 2. It can be observed that precision of 83%, 81% and 52% has been observed for the Decision Tree, Bagging and naïve Bayes algorithms respectively. So with respect to the precision, it is observed that bagging approach is good. A comparative analysis of precision and recall is shown in the Figure 6.Comparitive analysis of precision and recall is shown in Figure 1, Figure 2 and Figure 3 for the Decision Tree, Naïve Bayes and Bagging approaches respectively. It can be observed that with respect to the precision and recall the performance and decision tree and the Bagging approach is good as comparison of the Naïve Bayes approach.
All three algorithms also compared with respect to the f-measure parameter as shown in Figure 5, it can be clearly seen that Bagging algorithm can perform well bug severity classification.