Learning a classifier for false positive error reports emitted by static code analysis tools
Authors:
Open Access
- 18 June 2017
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 35-42
Abstract
The large scale and high complexity of modern software systems make perfectly precise static code analysis (SCA) infeasible. Therefore SCA tools often over-approximate, so not to miss any real problems. This, however, comes at the expense of raising false alarms, which, in practice, reduces the usability of these tools. To partially address this problem, we propose a novel learning process whose goal is to discover program structures that cause a given SCA tool to emit false error reports, and then to use this information to predict whether a new error report is likely to be a false positive as well. To do this, we first preprocess code to isolate the locations that are related to the error report. Then, we apply machine learning techniques to the preprocessed code to discover correlations and to learn a classifier. We evaluated this approach in an initial case study of a widely-used SCA tool for Java. Our results showed that for our dataset we could accurately classify a large majority of false positive error reports. Moreover, we identified some common coding patterns that led to false positive errors. We believe that SCA developers may be able to redesign their methods to address these patterns and reduce false positive error reports.Keywords
Funding Information
- U.S. Department of Homeland Security (D15PC00169)
This publication has 15 references indexed in Scilit:
- Deep API learning2016
- Parameter-free probabilistic API mining across GitHub2016
- Deep learning code fragments for code clone detection2016
- Suggesting accurate method and class names2015
- On the localness of software2014
- Automated Classification of Static Code Analysis Alerts: A Case Study2013
- A statistical semantic language model for source code2013
- Test-case reduction for C compiler bugs2012
- Test-case reduction for C compiler bugsACM SIGPLAN Notices, 2012
- Simplifying and isolating failure-inducing inputIEEE Transactions on Software Engineering, 2002