Utilizing semantic clusters to Predict Software defects
Abstract
A method, apparatus and product for utilizing semantic clusters to predict software defects. The method comprising: obtaining a plurality of software elements that are associated with a version of a System Under Test (SUT), wherein the plurality of software elements comprise defective software elements which are associated with a defect in the version of the SUT; defining, by a processor, a plurality of clusters, wherein each cluster of the plurality of clusters comprises software elements having an attribute, wherein the attribute is associated with a functionality of the SUT; and determining a score of each cluster of the plurality of clusters, wherein the score of a cluster is based on a relation between a number of defect software elements in the cluster and a number of software elements in the cluster.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A computer-implemented method comprising:
obtaining a plurality of software elements that are associated with a version of a System Under Test (SUT), wherein the plurality of software elements comprise defective software elements which are associated with a defect in the version of the SUT; defining, by a processor, a plurality of clusters, wherein each cluster of the plurality of clusters comprises software elements having an attribute, wherein the attribute is associated with a functionality of the SUT; determining a score of each cluster of the plurality of clusters, wherein the score of a cluster is based on a relation between a number of defect software elements in the cluster and a number of software elements in the cluster; and outputting to a user an indication of scores of clusters.
2 . The computer-implemented method of claim 1 , wherein the plurality of clusters comprises a first cluster and a second cluster, wherein the first cluster comprises a software element and the second cluster comprises the software element, whereby the first cluster and the second cluster are overlapping.
3 . The computer-implemented method of claim 2 further comprising tagging each software element of the plurality of software elements with one or more tags, wherein each tag correspond to a different attribute, wherein said tagging comprises tagging the software element with a plurality of tags which comprise at least a first tag and a second tag, wherein the first cluster is associated with the first tag and the second cluster is associated with the second tag.
4 . The computer-implemented method of claim 1 , wherein the plurality of software elements are comprised in the version of the SUT, wherein the plurality of software elements are selected from the group consisting of: program instructions, functions, and source code files.
5 . The computer-implemented method of claim 1 , wherein the plurality of software elements are comprised in one or more tests of the SUT, wherein the plurality of software elements are instructions to test the SUT.
6 . The computer-implemented method of claim 1 , wherein the attribute that is associated with each cluster is a functionality of the software elements comprised in the cluster, wherein the functionality is selected from the group consisting of:
the software elements accessing a predetermined data structure of the SUT; the software elements invoking a function of a predetermined component of the SUT; the software elements using a predetermined variable of the SUT; the software elements performing recovery functionality; the software elements performing Input/Output (I/O) functionality; the software elements using concurrency functionality.
7 . The computer-implemented method of claim 1 , wherein the attribute is indifferent to whether or not a software element is a defective software element.
8 . The computer-implemented method of claim 1 , wherein said determining the score comprises computing the score by using the formula: DSE÷√{square root over (SE)}, wherein SE is a total number of software elements in the cluster, wherein DSE is a total number of defective software elements in the cluster.
9 . The computer-implemented method of claim 1 , wherein said determining the score comprises computing the score by using the formula 1−B(DSE,SE,P), wherein SE is a total number of software elements in the cluster, wherein DSE is a total number of defective software elements in the cluster, wherein P is a ratio between a total number of defective software elements that are associated with the version of the SUT and a total number of software elements that are associated with the version of the SUT, and wherein B is a cumulative binomial distribution function.
10 . The computer-implemented method of claim 1 , wherein said outputting comprises outputting to the user a list of clusters sorted by their score.
11 . The computer-implemented method of claim 1 further comprises:
defining a second plurality of clusters, wherein each cluster of the second plurality of clusters comprises software elements of a second version of the SUT, wherein each cluster of the second plurality of clusters is associated with an attribute;
ranking the second plurality of clusters based on the scores of the plurality of clusters, wherein a cluster of the second plurality of clusters is ranked based on a score of a corresponding cluster in the plurality of clusters that is associated with a same attribute.
12 . The computer-implemented method of claim 11 , wherein said outputting comprises:
outputting a recommendation to review software elements of the second version of the SUT, wherein the recommendation refers to software elements that are comprised in a top ranking cluster of the second plurality of clusters.
13 . The computer-implemented method of claim 12 , wherein the recommendation comprises a recommendation to review a first software element, wherein the first software elements is comprised by the version of the SUT and by the second version of the SUT, wherein the first software element is not associated with a defect in the version of the SUT.
14 . The computer-implemented method of claim 1 further comprising:
training a machine learning tool to make a prediction for a software element, wherein said training comprises:
computing a score for each software element of the plurality of software elements, wherein the score of a software element is based on scores of cluster comprising the software element; and
providing the machine learning tool with pairs of sets of attributes and scores, wherein each pair corresponds to a software element and its associated score;
obtaining a second software element having a set of one or more attributes; and
predicting, by the machine learning tool, a prediction with respect to the software element based on the set of one or more attributes.
15 . A computerized apparatus having a processor, the processor being adapted to perform the steps of:
obtaining a plurality of software elements that are associated with a version of a System Under Test (SUT), wherein the plurality of software elements comprise defective software elements which are associated with a defect in the version of the SUT; defining a plurality of clusters, wherein each cluster of the plurality of clusters comprises software elements having an attribute, wherein the attribute is associated with a functionality of the SUT; and determining a score of each cluster of the plurality of clusters, wherein the score of a cluster is based on a relation between a number of defect software elements in the cluster and a number of software elements in the cluster.
16 . The computerized apparatus of claim 15 , wherein the plurality of clusters comprises a first cluster and a second cluster, wherein the first cluster comprises a software element and the second cluster comprises the software element, whereby the first cluster and the second cluster are overlapping.
17 . The computerized apparatus of claim 15 , wherein said determining the score comprises computing the score by using the formula: DSE÷√{square root over (SE)}, wherein SE is a total number of software elements in the cluster, wherein DSE is a total number of defective software elements in the cluster.
18 . The computerized apparatus of claim 15 , wherein said determining the score comprises computing the score by using the formula 1−B(DSE,SE,P), wherein SE is a total number of software elements in the cluster, wherein DSE is a total number of defective software elements in the cluster, wherein P is a ratio between a total number of defective software elements that are associated with the version of the SUT and a total number of software elements that are associated with the version of the SUT, and wherein B is a cumulative binomial distribution function.
19 . The computerized apparatus of claim 15 , wherein the processor is further adapted to perform:
defining a second plurality of clusters, wherein each cluster of the second plurality of clusters comprises software elements of a second version of the SUT, wherein each cluster of the second plurality of clusters is associated with an attribute; ranking the second plurality of clusters based on the scores of the plurality of clusters, wherein a cluster of the second plurality of clusters is ranked based on a score of a corresponding cluster in the plurality of clusters that is associated with a same attribute.
20 . The computerized apparatus of claim 15 , wherein the processor is further adapted to perform:
training a machine learning tool to make a prediction for a software element, wherein said training comprises:
computing a score for each software element of the plurality of software elements, wherein the score of a software element is based on scores of cluster comprising the software element; and
providing the machine learning tool with pairs of sets of attributes and scores, wherein each pair corresponds to a software element and its associated score;
obtaining a second software element having a set of one or more attributes; and predicting, by the machine learning tool, a prediction with respect to the software element based on the set of one or more attributes.Join the waitlist — get patent alerts
Track US2016004627A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.