Fault Localization for Null Pointer Exception Based on Stack Trace and Program Slicing

Shujuan Jiang,Wei Li,Haiyang Li,Yanmei Zhang,Hongchang Zhang,Yingqi Liu
DOI: https://doi.org/10.1109/qsic.2012.36
2012-01-01
Abstract:Null pointer exception is a commonly occurring error in Java programs, and many static analysis tools can identify such errors. However, most of existing tools are pure static analysis and suffer from the common problems of the pure static approaches. In this paper, we present a new approach for identifying null dereferences by combining the dynamically generated information (from the stack trace) with the static analysis. Starting at a dereference statement, where the null pointer exception occurred, our approach performs a backward program slicing guided by the stack trace. Then it performs the null identifying analysis and alias analysis on the sliced program. The approach also visualizes the analysis results and the related source codes. Finally, the paper also presents an implementation of the null pointer exception analysis. The results show the advantage of our approach for locating null pointer exception.
What problem does this paper attempt to address?