A method and system for automatically assigning defects fusing defect history throwaway relationships
By integrating the historical throwing relationships of defects, the defect assignment model is optimized, and the most suitable developer is recommended. This solves the problem of excessively long throwing paths in existing technologies, improves defect repair efficiency, and reduces costs.
Patent Information
- Application Number
- CN202110459917.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2041-04-27
AI Technical Summary
Existing defect dispatch methods fail to comprehensively consider the developer's own ability to fix defects and the information in defect reports during the secondary dispatch process, resulting in excessively long throw paths and increased repair time and costs.
By acquiring metadata and textual feature information from defect reports and combining them with historical dumping relationships among developers, a transition probability matrix is generated to optimize the defect assignment model and recommend the most suitable developer.
It shortens the path for defect reports, improves defect repair efficiency, and reduces software maintenance costs.
Smart Images

Figure CN113157580B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of defect report automatic assignment, and particularly relates to a defect automatic assignment method and system fusing defect history throwing relationship. BACKGROUND
[0002] The statements in this section merely provide background information related to the present application and do not necessarily constitute the prior art.
[0003] In the whole life cycle of software development and maintenance, the appearance of defects (Bug) is inevitable. If the defects are not repaired in time, the normal use of the software system will be affected, the system upgrade update will be delayed, the user experience will be reduced, and even serious consequences will be caused. Repairing these defects is a time-consuming and costly task. The software maintenance cost generally accounts for at least 50% of the total cost related to the software product, and sometimes more than 90%, and some estimates believe that the maintenance cost is several times the cost of the initial software version. Improving the efficiency of defect repair will shorten the project cycle, reduce the workload of repair and reduce the cost of software production.
[0004] In order to correctly track the processing process of each defect report (Bug Report), the defects found during software testing or encountered by users during use are usually input into a defect tracking management system as a record by record, and the recorded defect information generally includes the type of software error found, the product, component, hardware information of the error, the severity level of the error, the title and specific description information of the error, necessary drawings, test notes, etc. The processing information includes the name of the processor, the processing time, the processing steps, the current state of the error record, and through these information, the defect record and the corresponding modification information at any time can be traced back.
[0005] One popular example of such a bug tracking system is Bugzilla, an open source and free bug tracking system provided by Mozilla Corporation, which was originally introduced in the development of Mozilla Web browser and is now widely used in many other projects. Bug tracking management systems are particularly important in open source software development, because in open source software development, team members can be scattered around the world, and developers and other project contributors rarely meet, which makes it more difficult to fix work. Bug tracking management systems just solve this problem. Bugzilla not only tracks problem reports and feature requests, but also coordinates work between developers. When a new bug report is submitted, a senior developer or project manager will select a developer with the skills to fix the bug report, and during the bug fixing process, the developer and the bug reporter will communicate through comments, and they can upload additional resources (such as screenshots) to support the repair of the bug report. This process of assigning bug reports to appropriate developers is called bug triage.
[0006] However, in fact, the first assigned developer may not have the expertise to solve a particular type of bug report or the bug report may be too complex for one developer to complete the repair task, so reassignment must be made until the repair work is completed. This process of reassigning bug reports is called bug tossing. Bug report reassignment is a lengthy and expensive process. Some empirical studies show that, on average, it takes about 40 days to assign a bug report to the first developer in the Eclipse project, and then it takes an additional 100 days or more to reassign the bug report to the second developer. Similarly, in the Mozilla project, the first assignment takes 180 days, and if the first assigned developer cannot fix it, an additional 250 days is needed for reassignment. In the Eclipse and Mozilla websites, 37% and 44% of bug reports are thrown out at least once (throwing path ≥ 1), and 10% of bug reports are even re-assigned five or more times. During the bug testing process, incorrect assignment and tossing will increase the time to fix the bug, which will also seriously delay the delivery cycle of the software.
[0007] In order to better assign the bug reports that occur to the developers who can solve the bug, researchers have proposed various bug assignment methods. Existing bug assignment methods are generally of the following types:
[0008] The first type uses information retrieval technology, uses the text information of the defect report, constructs the representation between the defect report and the developer, and then matches the defect report with the most relevant developer; the second type uses machine learning technology, extracts the features of the defect report or learns the representation, and regards the developer as a label and the attribute information of the defect report as a feature, trains and recommends a suitable developer in a classification manner;
[0009] In addition, researchers have proposed several methods combining machine learning and tossing graphs to reduce the length of the tossing path and improve the accuracy of prediction. However, the above defect assignment algorithms still have the following problems:
[0010] 1) In the secondary assignment process, only the probability of the defect being unable to be repaired by itself and being assigned to other repairers is considered, and the probability of the defect being modified by itself is not comprehensively considered.
[0011] 2) In the secondary assignment process, only enumerable features (such as product type, component, etc.) are used as allocation basis, and the information of the defect report (such as description information of the defect report) is not comprehensively considered, and the tossing is lack of interpretability.
[0012] 3) In the secondary assignment process, the probability density information of the first assignment is not considered. SUMMARY
[0013] To solve the above problems, the present application provides an automatic defect assignment method and system fusing defect history tossing relationship, which can consider the features of the defect report and the tossing relationship between developers when assigning defects, and realize automatic assignment of defect reports to developers.
[0014] In some embodiments, the following technical solutions are adopted:
[0015] An automatic defect assignment method fusing defect history tossing relationship, comprising:
[0016] Obtaining metadata information and text feature information of the defect report, and extracting the tossing relationship between developers on the defect report based on the historical repair information of the defect report;
[0017] After processing the obtained data, inputting the data into a trained defect assignment model, the defect assignment model obtains the probability of the semi-developer being transferred to the final repairer, and generates a transfer probability matrix;
[0018] Based on the probability of the first assignment and the transfer probability matrix, a developer ranking most matched with the defect report is obtained, and the defect report is recommended to the corresponding developer according to the ranking.
[0019] In some other embodiments, the following technical solutions are adopted:
[0020] An automatic defect assignment system fusing defect history tossing relationship, comprising:
[0021] A data acquisition module is configured to acquire metadata information and text feature information of a defect report, and extract a tossing relationship between developers on the defect report based on historical repair information of the defect report;
[0022] A defect report assignment module is configured to input the acquired data into a trained defect assignment model after processing, acquire a transfer probability matrix from a probability of a semi-developer being transferred to a final repairer by the defect assignment model, and obtain a ranking of developers most matched with the defect report based on a first assignment probability and the transfer probability matrix, and recommend the defect report to a corresponding developer according to the ranking.
[0023] In some other embodiments, the following technical solutions are adopted:
[0024] A terminal device comprises a processor and a memory, the processor is configured to implement instructions, and the memory is configured to store a plurality of instructions, the instructions are adapted to be loaded and executed by the processor to implement the defect automatic assignment method fusing defect history tossing relationship.
[0025] In some other embodiments, the following technical solutions are adopted:
[0026] A computer readable storage medium, wherein a plurality of instructions are stored, the instructions are adapted to be loaded and executed by a processor of a terminal device to implement the defect automatic assignment method fusing defect history tossing relationship.
[0027] Compared with the prior art, the method has the following beneficial effects:
[0028] The method can consider the possibility of a developer repairing the defect report itself when performing secondary assignment based on the characteristics of the defect report itself;
[0029] The method helps to enhance the representation learning ability of defect report characteristics and the modeling potential of considering the tossing relationship between developers at the same time;
[0030] The method provides a matrix multiplication scheme, which comprehensively considers the probability density of the first allocation and the secondary allocation ranking of the transfer probability of the repairer for specific report information;
[0031] Other features and advantages of the present application will be partially given in the following description, partially will become obvious from the following description, or will be understood by practicing the present application. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a defect report processing flow diagram;
[0033] Figure 2 is a defect report tossing path diagram;
[0034] Figure 3 is a model of fusing defect report features with historical defect relationships according to an embodiment of the present application;
[0035] Figure 4 is a transition matrix model generated according to historical tossing relationships according to an embodiment of the present application. DETAILED DESCRIPTION
[0036] It should be noted that the following detailed description is merely exemplary and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0037] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.
[0038] Embodiment One
[0039] A general defect report processing flow for most defects is shown in Figure 1 , which includes that a user or developer finds a problem and then submits the problem using a bug tracking system. Then, a manager or developer of the corresponding project will read the defect report, determine which module the problem belongs to, and assign the bug to an appropriate developer. When the assigned developer is unable to fully perform the repair task, defect tossing occurs, and the defect report is tossed to another developer until the defect report is tossed to the nth developer who is able to perform the repair task, and the tossing ends. T = d1→d2→d3....→dn is called a tossing path, d1 is the first assigned repairer, dn is the final repairer, and n-1 is called the length of the tossing path.
[0040] Tossing Path: When the first assigned developer d1 is unable to complete the repair task, he tosses the defect report to another developer d2, and so on, until the defect report is tossed to the nth developer who is able to perform the repair task, and the tossing ends. T = d1→d2→d3....→dn is called a tossing path, d1 is the first assigned repairer, dn is the final repairer, and n-1 is called the length of the tossing path.
[0041] Tossing Graph: Suppose there are several tossing paths, A->B->C->D, A->D->E, B->C->E, C->D->E->F, A->C->E->F, for the four tossing paths, consider each step of tossing, and build a tossing graph with the current node to the next node as an edge, and the generated tossing graph is shown in FIG. 1. Figure 2
[0042] Defect reports have their own characteristics, and there is a certain similarity between different defect reports. Developers with specific professional knowledge may be good at solving only one or a few types of defect reports. Therefore, in the secondary assignment, the embodiment increases the similarity between defect reports and the tossing relationship between developers.
[0043] According to an embodiment of the present application, a defect automatic assignment method fusing defect history tossing relationship is disclosed, comprising the following steps:
[0044] (1) Obtain the metadata information (product, component and hardware) and text feature information (title and description) of the defect report, and extract the tossing relationship between developers for the defect report based on the historical repair information of the defect report;
[0045] The tossing relationship refers to: for a defect report, it is first assigned to a developer d1, if d1 cannot solve the defect report for various reasons, the defect report is tossed to a second developer d2, and so on, until the final repairer dn, this process is called tossing, and T = di->d2…dn is called a tossing path. For developers, they may be good at solving only a specific type of defect report, so when tossing, a specific type of defect report will eventually be tossed to a developer with specific expertise, which is the tossing relationship.
[0046] In the data set we collected, there is historical repair information for each defect report, including tossing path information of the defect report. According to the tossing path of each defect report in the data set, the tossing relationship can be extracted.
[0047] According to the tossing relationship of the developers for the defect report, the defect report can be saved from unnecessary tossing when tossing, the tossing path can be shortened, and the maintenance cost can be reduced.
[0048] (2) After processing the obtained data, input the data into the trained defect assignment model, the defect assignment model obtains the probability of transfer from the halfway developer to the final repairer, and generates a transfer probability matrix;
[0049] Based on the first assignment probability and the transition probability matrix, the ranking of the developers most matched with the defect report is obtained, and the defect report is recommended to the corresponding developer according to the ranking.
[0050] The first assignment is to recommend a developer by using a machine learning algorithm (such as SVM, Naive Bayes, Bayesian network, etc.), the first assignment probability is obtained by inputting the features of the defect report and the fixer into the machine learning algorithm for training and then prediction, outputting the top K developers, and obtaining the probability that the top K recommended developers solve the defect report.
[0051] Specifically, in the data processing stage, first, the metadata is embedded, the title and description information of the defect report are converted into vectors by Bert, and the vectors of all feature data are spliced to generate the input data of the model. According to the historical records of defect reports that have been solved, the tossing information of the developer to the defect report is obtained, and the defect reports that have been solved by the developer and the defect reports that have not been solved and are tossed out are obtained.
[0052] According to the collected data set, the tossing relationship of the developers to the defect report is obtained by extracting the historical tossing records.
[0053] The processed data is calculated by the attention mechanism to obtain the similarity between a specific defect report and its historical repair records of the developer, and the probability of the specific defect report being transferred to the final fixer via a semi-way developer is obtained via a fully connected neural network and a sigmoid function, thereby generating a transition probability matrix. Finally, the probability distribution of the first assignment recommendation is multiplied by the transition probability matrix to obtain the final recommendation result.
[0054] It should be noted that the defect assignment model needs to be trained; the specific defect report and the defect report related to the final fixer without the semi-way developer are input into the model, the parameters inside the model are adjusted through back propagation, and a most ideal parameter model is found through the continuous decrease of loss and saved.
[0055] In this embodiment, the metadata of the defect report is Onehot coded as input data, which is input into the classification algorithm to obtain the first assigned developer and the first assignment probability density:
[0056]
[0057] wherein represents the probability of the first assignment of the nth defect report to the i th fixer.
[0058] During secondary dispatch, metadata information is converted into an enumeration type, and the enumeration sequence number is directly mapped to a 10-dimensional vector representation using the Embedding method. Text information, including titles and descriptions, is converted into 200-dimensional vectors using BERT. Specifically, the number of attention heads in the encoder layer of BERT is set to 10, and the dimensions of the encoding and pooling layers are set to 200 to extract effective features from defect reports.
[0059] Each defect report is converted into a vector of data and then concatenated to serve as the input data for the model. Let S be the vector data. k This is the vectorized representation of the k-th defect report.
[0060] Define a dispatch relation A, where A k It is the set of developers who reported the kth defect. For defect reporting R k The ultimate restorer For defect reporting R k A developer who worked on the project halfway through.
[0061] The vectorized representation of the developer who completed the project halfway through is as follows: The defect report R is calculated through the Attention mechanism. k With D ka Historical restoration records H ka =F ka -R k The similarity, among which, It is R k A developer who completed the project halfway through. Let M... ka For H ka The defect report is vectorized into a concatenated matrix.
[0062] Let the query vector Q be... halfway =W query R k key vector K halfway =W key M ka value vector V halfway =W value M ka ;
[0063] set up For developer D ka Compared to defect report R k The vectorized representation of .
[0064]
[0065] Where dk is the dimension of the vector.
[0066] Vectorization of the final developer, calculate the defect report R via Attention mechanism k With D kb History repair record H kb =F kb -R k Similarity, where, The final repairer of R k Set M kb The matrix spliced by the vectorization of the defect report in H kb .
[0067] Set query vector Q finally =W query R k , key vector K finally =W key M kb , value vector V finally =W value M ka ;
[0068] Set The vectorization of the developer D kb With respect to the defect report R k .
[0069]
[0070] Next, calculate the transition probability.
[0071] Splice the vectorization of the Kth defect report S k , the vectorization of the user D ka With respect to the defect report R k The vectorization of the user D kb With respect to the defect report R k
[0072]
[0073] Then splice the vector S via a fully connected neural network, sigmoid function. Get the probability of a specific defect report R k , via the developer D ka Halfway, to the final repairer D kb .
[0074]
[0075] Where sigmoid is the logistic regression function, Linear is the fully connected layer, Relu is the activation function, and Contact is the vector splicing operation.
[0076] Then, we can construct the Tossing Assign matrix TAM:
[0077]
[0078] S k Refers to a specific bug report. Each value in the matrix can be recorded as Where is the ith(i = 1, 2, …, u) developer who has not solved the tossed bug report, is the jth(j = 1, 2, …, u) developer who has solved the bug report.
[0079] Each bug report generates a transition probability matrix, and each value in the matrix is obtained as follows: for a specific bug report, when recommending developers using a machine learning algorithm (such as SVM, Naive Bayes, Bayesian network, etc.), the Top10 developers [d1, d2, d3…d10] are recommended, for each developer di in the Top10, i ∈ (1, 10), according to the extracted historical modification records in the data set, find the developers di, i ∈ (1, 10) who have not solved the tossed bug report and dj, j ∈ (1, 10) who have solved the bug report, and through the model proposed, the probability value of the developer di not solving and the developer dj solving is obtained.
[0080] For a new bug report n, after the first assignment, we can get the initial recommendation probability distribution
[0081] Let the initial recommendation probability distribution vector P nf be V, the transition probability matrix TAM n be W, in order to both retain the information of the first assignment and consider the stability of the transition matrix, we perform appropriate parameter tuning as follows:
[0082] p ne = V·(W α +I·β)
[0083] Where I is a diagonal matrix, and α, β are non-negative hyperparameters used to control the importance of different parts of the model.
[0084] Through matrix multiplication, we get the final repairer recommendation distribution p ne , arrange p ne according to the value size, select the top K, generate a TopK recommendation list, and get the K developers most matched to the new bug report.
[0085] Then the defect report is recommended to the developer with the highest matching degree according to the result.
[0086] Embodiment two
[0087] According to an embodiment of the present application, a defect automatic assignment system fusing defect history tossing relationship is disclosed, comprising:
[0088] A data acquisition module is configured to acquire metadata information and text feature information of a defect report, and extract a tossing relationship between developers on the defect report based on historical repair information of the defect report.
[0089] A defect report assignment module is configured to input the acquired data into a trained defect assignment model after processing, acquire a transfer probability matrix from a probability of a semi-developer being transferred to a final repairer by the defect assignment model, obtain a ranking of developers most matched with the defect report based on a first assignment probability and the transfer probability matrix, and recommend the defect report to a corresponding developer according to the ranking.
[0090] It should be noted that the specific implementation of each module has been described in detail in Embodiment One, and will not be repeated here.
[0091] Embodiment three
[0092] According to an embodiment of the present application, a terminal device is disclosed, comprising a processor and a memory, the processor is configured to implement instructions, and the memory is configured to store a plurality of instructions, the instructions are adapted to be loaded and executed by the processor to implement the defect automatic assignment method fusing defect history tossing relationship described in Embodiment One.
[0093] In some other embodiments, a computer readable storage medium is disclosed, wherein a plurality of instructions are stored, the instructions are adapted to be loaded and executed by a processor of a terminal device to implement the defect automatic assignment method fusing defect history tossing relationship described in Embodiment One.
[0094] The above describes the specific embodiments of the present application in combination with the accompanying drawings, but is not a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications or variations made by those skilled in the art on the basis of the technical solutions of the present application without creative labor are still within the protection scope of the present application.
Claims
1. A method for automatically assigning defects to fuse defect history throwaway relationships, comprising: The method comprises the following steps: Obtain metadata information and text feature information of the defect report, and extract tossing relationship between developers based on historical repair information of the defect report; After processing the obtained data, input the data into a trained defect assignment model, and the defect assignment model obtains a probability of being transferred by a halfway developer to a final repairer, and generates a transfer probability matrix, specifically comprising: Concatenate the vectorized representation of the defect report, the vectorized representation of the halfway developer relative to the defect report, and the vectorized representation of the final repairer relative to the defect report to obtain a vector representation; Obtain the probability of the defect report being transferred by the halfway developer to the final repairer via a fully connected neural network and a sigmoid function; Generate a transfer probability matrix; Calculate the similarity between the defect report and the historical repair record of the halfway developer by an Attention mechanism to obtain the vectorized representation of the halfway developer relative to the defect report; Calculate the similarity between the defect report and the historical repair record of the final repairer by an Attention mechanism to obtain the vectorized representation of the final repairer relative to the defect report; Based on the probability of the first assignment and the transfer probability matrix, obtain a ranking of developers most matched with the defect report, and recommend the defect report to the corresponding developer according to the ranking. The final recommended result is obtained, specifically comprising: p ne = V · (W α + I · β) Wherein, V is an initial recommended probability distribution vector, W is a transfer probability matrix, I is a diagonal matrix, and α and β are non-negative hyperparameters for controlling the importance of different parts of the model.
2. A method for automatically assigning defects fused with history-throwing relationships according to claim 1, wherein, Concatenate the obtained data into a vector of feature data as input data of the defect assignment model, and the specific process comprises: For the obtained metadata information of the defect report, map the serial number into a vector representation by an Embedding method; for the obtained text feature information, map the text feature information into a vector representation by a Bert model; and obtain the vectorized representation of the defect report by concatenating different dimensional features.
3. A method for automatically assigning defects fused with history-throwing relationships to defects as claimed in claim 1, wherein, Obtain the probability of being assigned to each developer for the first time by a classification algorithm to form a probability distribution vector.
4. The method of claim 1, wherein the method further comprises: According to the records of the defect reports that have been solved, obtain the tossing information of the defect report by the developer, and obtain the defect reports that have been solved by the developer and the defect reports that have not been solved and are thrown out.
5. An automated defect assignment system that merges defect history throwaway relationships using the method of claim 1, wherein, The method comprises the following steps: A data acquisition module is configured to obtain metadata information and text feature information of the defect report, and extract tossing relationship between developers based on historical repair information of the defect report; A defect report assignment module is configured to input the processed data into a trained defect assignment model, and the defect assignment model obtains a probability of being transferred by a halfway developer to a final repairer, and generates a transfer probability matrix; Based on the probability of the first assignment and the transfer probability matrix, obtain a ranking of developers most matched with the defect report, and recommend the defect report to the corresponding developer according to the ranking.
6. A terminal device comprising a processor and a memory, the processor being configured to implement instructions; the memory being configured to store a plurality of instructions, wherein the terminal device is configured to perform the method according to any one of claims 1-5. The instructions are adapted to be loaded and executed by the processor to perform the defect automatic assignment method fusing defect historical tossing relationship according to any one of claims 1-4.
7. A computer-readable storage medium having stored therein a plurality of instructions, wherein the instructions, when executed by a processor, cause the processor to perform operations comprising: The instructions are adapted to be loaded and executed by a processor of the terminal device to perform the defect automatic dispatching method fusing the defect history and the throw relationship according to any one of claims 1-4. The instructions are adapted to be loaded and executed by a processor of the terminal device to perform the defect automatic dispatching method fusing the defect history and the throw relationship according to any one of claims 1-4.
Citation Information
Patent Citations
Method for distributing bug reports based on multi-feature bug redistribution diagrams
CN102629230A
Automatic defect report assignment method based on knowledge base and representation learning
CN111723021A