Blocking Bug Identification Method Based on Binary Correlation and Logistic Regression Analysis
By using Binary Relevance and Logistic Regression analysis methods in software development, a prediction model of blocking and blocked tags is built, which solves the problem of difficult software blocking bugs in the existing technology, and realizes automated identification and prediction of bug relationships, helps developers better repair bugs.
Patent Information
- Application Number
- CN202210895176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-07-26
AI Technical Summary
The existing technology is difficult to effectively predict the existence of blocking bugs in software, making it difficult for developers to maintain and repair downstream software systems.
Using Binary Relevance and Logistic Regression analysis methods, we automatically identify whether software bugs contain blocking tags or blocking tags by building prediction models of blocking tags and blocking tags.
It realizes automated prediction of blocking bugs, helping developers solve blocking problems in advance, thereby better fixing bugs.
Smart Images

Figure CN115269246B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer application technology, and in particular to a method for identifying blocking bugs based on Binary Relevance and Logistic Regression analysis. Background Art
[0002] There are many relationships between bugs in a complex software ecosystem, one of which is blocking bugs. Blocking bugs are software bugs that block other bug fixes until they are fixed. Due to the existence of blocking bugs, developers are unable to carry out the maintenance and repair process of downstream software systems. This blocking relationship makes it difficult for downstream developers to fix these blocked bugs even if they have the ability and resources. In order to address the harmful effects of blocking errors, many developers have conducted empirical studies on them, trying to predict the existence of blocking bugs earlier.
[0003] Therefore, effective automated prediction methods can effectively solve the negative impact of blocking bugs. Many machine learning methods have been applied to build prediction models and have been proven to achieve good prediction results. Previous work focused on predicting whether there is a blocking relationship between bugs. No further work was done to predict whether the bug was blocked or had a blocking relationship. Summary of the invention
[0004] The present invention aims to provide a blocking bug identification method based on binary correlation and logistic regression analysis, which can automatically predict whether a software bug contains a blocking label or a blocked label.
[0005] The idea of the present invention is: the method for identifying blocking bugs based on Binary Relevance and Logistic Regression analysis provided by the present invention is a multi-label prediction method for blocking bugs based on problem conversion, that is, using Binary Relevance and Logistic Regression analysis to build prediction models for the blocking label and blocked label of the bug respectively. The method proposed in this article has achieved good prediction performance on seven open source project data sets.
[0006] The present invention is implemented by the following technical solution: a blocking bug identification method based on binary correlation and logistic regression analysis, which includes the following steps:
[0007] (1) Seven open source projects were selected as data sources, and a specific data set for training was constructed through an algorithm. The specific division operation included the following steps:
[0008] (1-1) Using the crawler algorithm, we obtain various fields in the bug reports from seven bug management systems and construct an initial data set.
[0009] (1-2) According to whether the "Blocks" and "Depends on" fields contain bug numbers, a label is assigned to the bug in the form of (Y1, Y2). The first digit represents the blocking label and the second digit represents the blocked label. The value is 1 or 0, where 1 represents the existence of the label and 0 represents the non-existence of the label.
[0010] (1-3) Using a custom partitioning algorithm, the blocked label training dataset and the blocked label prediction training dataset are screened out from the initial dataset based on the number of bugs contained in the "Blocks" and "Depends on" fields in the bug report.
[0011] (2) Preprocessing the two training data sets constructed in step 1, wherein step 2 includes the following steps when performing preprocessing:
[0012] (2-1) Use the Word2Vec method to encode non-digital text content into word vectors to obtain word vector feature representations of text fields in bug reports;
[0013] (2-2) Perform correlation analysis on each vectorized field feature and select the fields with high correlation with the prediction of blocking bug labels as training features for subsequent experiments;
[0014] (3) Divide the data set into training set, validation set and test set. Use the training set and validation set to complete the model construction and training and prevent overfitting; use the test set to test the prediction performance of the model. The specific steps are as follows:
[0015] (3-1) Input the feature vector and corresponding label into the logistic regression model and perform parameter fitting through training;
[0016] (3-2) Trained on two sets of data sets respectively, and obtained the blocking label prediction model and the blocked label prediction model;
[0017] (3-3) Input the feature vector of the test case into the two models respectively, obtain two predicted labels and combine them (Y1′, Y2′);
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] (1) Select the Binary Relevance method to convert the multi-label problem into a simple binary classification problem;
[0020] (2) It uses logistic regression method, which has low computational cost and is easy to understand and implement;
[0021] (3) The logistic regression method has low computational complexity and can predict more bug labels in a shorter time.
[0022] (4) The prediction of blocking and blocked labels shows developers the relationship between bugs in a more comprehensive way, helping them solve blocking problems in advance and thus better fix the bugs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0024] Figure 1 A framework diagram of an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0026] Example 1
[0027] Reference Figure 1 The technical solution provided in this embodiment is a blocking bug identification method based on binary correlation and logistic regression analysis, which specifically includes the following steps:
[0028] (1) Data processing:
[0029] (1-1) After obtaining bug reports in batches, assign labels to bugs based on the "Blocks" and "Depends on" fields in the form of (Y1, Y2). The first digit represents the blocking label, and the second digit represents the blocked label. The value is 1 or 0, where 1 represents the existence of the label and 0 represents the non-existence of the label.
[0030] (1-2) Using a partitioning algorithm, a specific type of bug is selected from a large number of bugs as a training data set for the blocking and blocked prediction model;
[0031] (1-3) Use the Word2Vec method to convert the text fields in the bug report into word vectors to facilitate subsequent model training;
[0032] (1-4) Perform correlation analysis on all fields in the bug report and filter out fields that are more correlated with blocking and blocked label prediction, such as comment, cc list, description, etc.
[0033] (2) Model construction:
[0034] (2-1) Divide the data into two groups of training set and validation set in a ratio of 8:2, and other types of bugs constitute the test set; the training set is used to build and train the model, the validation set is used to optimize the model and prevent model overfitting, and the test set is used to verify the model performance.
[0035] (2-2) The two selected specific training sets are used for logistic regression model training, and the Sigmoid function is used to complete the output of the Bug label. The specific formula is as follows:
[0036]
[0037] (2-3) For the test data, the new test bug inputs the preprocessed vector features into the two models respectively, and finally combines the prediction results Y1 and Y2 of the two models as the final prediction result of the bug.
[0038] (3) Evaluation experiment:
[0039] (3-1) In order to better evaluate the effectiveness of BR-LR in blocking bug prediction, we conducted empirical studies on seven open source projects: Eclipse, Mozilla, NetBeans, Chromium, OpenOffice, RedHat, and Gentoo, which included a total of 436,047 bug reports.
[0040] (3-2) We evaluate the effectiveness of our model using six evaluation indicators from two aspects;
[0041] 1. Evaluation methods that do not consider partial correctness: exact match rate (MR) and zero-one loss (L 0-1 );
[0042] 2. Consider some correct evaluation methods (the following are evaluation indicators in multi-label classification scenarios): accuracy, precision, recall and F1 measure.
[0043] (3-3) Table 1 shows the experimental results of the BR-LR model we built in different open source projects.
[0044] From Table 1, we can find that the BR-LR model has good performance in MR and L 0-1The performance on these two indicators is average. This is a completely correct case to evaluate the prediction results. Better values can only be obtained when both labels are successfully predicted. On average, the MR of the BR-LR model is 0.327, which means that the bugs that can be accurately predicted on both labels account for 32.7% of all bugs. From another evaluation perspective, considering partial correctness, it can be seen from the two indicators of accuracy and F1 measure that the BR-LR model has better performance. The accuracy and F1 measure of this model are 0.549 and 0.506 respectively. This shows that by looking at each label separately, the model can obtain good predictions.
[0045] Table 1 Values of BR-LR results on each metric.
[0046]
[0047] It can be concluded from Table 1 that the method of this embodiment can effectively identify various software bugs and more quickly determine whether the bug blocks other bugs or is blocked by other bugs; it is helpful for developers to better allocate work, solve key blocking bugs, and effectively use time and resources.
[0048] Taking a test bug report as an example, two bug numbers are displayed in the "Blocks" field of Bug 578485, and there is no bug number in the "Depends on" field. The original label of the bug is: (1,0).
[0049] Then, after inputting the fields in the above bug report into the model, the predicted value obtained is: (0.86, 0.23); it can be found that the method of this embodiment gives possible probabilities for the two labels respectively, and the results are also consistent with the actual situation.
[0050] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A blocking bug identification method based on binary correlation and logistic regression analysis, characterized in that: The following steps are involved: S1: Select seven open source projects as data sources and construct a specific data set for training through algorithms. The specific division operation includes the following steps: S1-1: Using crawler algorithms, we obtain various fields in bug reports from seven bug management systems and construct an initial data set; S1-2: According to whether the "Blocks" and "Depends on" fields contain the bug number, the bug is assigned a label in the form of (Y1, Y2). The first bit represents the blocking label and the second bit represents the blocked label. The value is 1 or 0, where 1 represents the existence of the label and 0 represents the non-existence of the label. S1-3: Using a custom partitioning algorithm, according to the number of bugs contained in the "Blocks" and "Depends on" fields in the bug report, filter out the blocked label training dataset and the blocked label prediction training dataset from the initial dataset; S2: Preprocessing the two training data sets constructed in step S1, wherein step S2 includes the following steps when performing preprocessing: S2-1: Use the Word2Vec method to encode non-digital text content into word vectors to obtain the feature representation of the text field in the bug report; S2-2: Perform correlation analysis on each vectorized field feature and select fields with high correlation with the prediction of blocking bug labels as training features for subsequent experiments; S3: Divide the data set into training set, validation set and test set. Use the training set and validation set to complete the model construction and training and prevent overfitting. Use the test set to detect the prediction performance of the model, including the following steps: S3-1: Input the feature vector and corresponding label into the logistic regression model and perform parameter fitting through training; S3-2: Trained on two sets of data sets respectively to obtain the blocking label prediction model and the blocked label prediction model; S3-3: Input the feature vector of the test case into the two models respectively, obtain two predicted labels Y1′ and Y2′ and combine them.
Citation Information
Patent Citations
Construction method of multi-view multi-label classifier based on active learning
CN112766393A
Defect report severity prediction method based on active learning
CN114579471A