System and method to improve results of a static code analysis based on the probability of a true error
AssigneeParasoft Corporation
InventorsLeszek Jerzy Raszka, Leonid Borodaev
Life of this patent
Estimating the term…
Abstract
Computer-implemented method for improving the test results of a static code analyzer includes: receiving a plurality of test violations from the static code analyzer; constructing a first vector for each code snippet containing error candidates; constructing a second vector for each test violation from meta-data associated with said each test violation; merging the first vector with the second vector to produce a feature vector for each test violation; and applying statistical learning techniques to each feature vector to estimate a probability that an error candidate in the plurality of test violations is a true error or a false positive.
Claims15
A computer-implemented method for improving test results of a static code analyzer, the method comprising:
- receiving a plurality of test violations from the static code analyzer;
- for each test violation received from the static code analyzer, encoding a function or method in which said each test violation is identified into a first vector including a link to a source code snippet in which said each test violation is identified;
- factorizing and transforming meta data for said each test violation into a second vector;
- concatenating the first vector with the second vector to produce a single feature vector for said each test violation;
- randomly selecting a predetermined number of test violations from the plurality of test violations;
- analyzing the selected test violations to determine whether they are true errors or false positives;
- using the single feature vectors for said each test violation and results of analyzing the selected test violations as input to a machine learning engine to produce a regressor;
- and obtaining probabilities of being a false positive or a true error, for every one of remaining test violations that have not been analyzed;
- and prioritizing the remaining test violations that have not been analyzed, based on their probabilities of being a false positive or a true error.
A computer-implemented method for improving test results of a static code analyzer, the method comprising:
- receiving a plurality of test violations from the static code analyzer;
- constructing a first vector for each source code snippet containing error candidates including a link to the source code snippet in which said each test violation is identified;
- constructing a second vector for each test violation from meta-data associated with said each test violation;
- merging the first vector with the second vector to produce a feature vector for each test violation;
- and applying statistical learning techniques to each feature vector to estimate a probability that an error candidate in the plurality of test violations is a true error or a false positive;
- and prioritizing each feature vector for each test violation based on their probabilities of being a false positive or a true error.
A non-transitory computer storage medium for improving test results of a static code analyzer having stored thereon a plurality of programing instructions that when executed by a computer perform:
- receiving a plurality of test violations from the static code analyzer;
- constructing a first vector for each code snippet containing error candidates including a link to said each code snippet in which said each test violation is identified;
- constructing a second vector for each test violation from meta-data associated with said each test violation;
- merging the first vector with the second vector to produce a feature vector for each test violation;
- applying statistical learning techniques to each feature vector to estimate a probability that an error candidate in the plurality of test violations is a true error or a false positive;
- and
- prioritizing the remaining test violations that have not been analyzed, based on their probabilities of being a false positive or a true error.
Dependencies are inferred from the claim text.