Enhancing Field Tracking and Interprocedural Analysis to Find More Null Pointer Exceptions
Abstract
Null pointer dereference raises Null Pointer Exceptions (NPEs). There are two groups of approaches to detect NPEs. Type-based approaches carry out strict type-based null safety checking. They heavily rely on annotations, and thus produce many false positives. Dataflow-based approaches leverage static forward and/or backward dataflow analysis. They mostly have a limited capability in tracking fields and interprocedural analysis, and introduce false positives and false negatives. To address these drawbacks, we propose Wheeljack to detect NPEs for Java. It does not rely on annotations, and hence can work effectively under a lack of annotations. It leverages our novel abstraction of nullness status to enhance field tracking, and our novel invocation analysis (capturing change to return value and side effect of an invocation) to enhance interprocedural analysis. Our evaluation on 28 Java projects has demonstrated that Wheeljack can mostly outperform the four state-of-the-art NPE detectors in recall without sacrificing precision. 5 and 2 new NPEs have been confirmed and fixed by developers after we submit 8 issues.
BibTeX
@inproceedings{xie2024enhancing,
author = {Dongfang Xie and Bihuan Chen and Kaifeng Huang and Yu Wang and Linghao Pan and Zhicheng Chen and Xin Peng},
title = {{Enhancing Field Tracking and Interprocedural Analysis to Find More Null Pointer Exceptions}},
booktitle = {SANER},
year = {2024},
url = {https://openreview.net/forum?id=quL7HVKkP3},
}Ask Althea to put this paper to the test.
Loading related content...