Abstract

Null pointer exceptions are common software faults, but they are dangerous and can cause a program to crash if they occur. In addition, it is hard to find them by simply running test cases. When a null pointer exception occurs, the stack trace stored by the Java runtime environment can help us to locate the cause of the exception. In this paper, firstly, we propose an automatically null pointer exception localization approach guided by stack trace, from the null pointer dereference to the null value assignment point. Secondly, an empirical study is designed to evaluate the effectiveness of the tool on eight open source projects. The experimental results show that the tool is effective in locating the null pointer exception.

Highlights

  • Exception handling is the main mechanism to improve the software reliability in most programming language

  • The exceptions in Java can be divided into two categories: application exceptions raised by exceptional conditions in an application, and runtime exceptions raised by Java runtime environment

  • When a null pointer exception occurs, the stack trace stored by the Java runtime environment can help us to locate the cause of this exception

Read more

Summary

INTRODUCTION

Exception handling is the main mechanism to improve the software reliability in most programming language. When a null pointer exception occurs, the stack trace stored by the Java runtime environment can help us to locate the cause of this exception. During the inspection of the methods to locate the origin of the exception, the developer may miss those methods that were involved in the execution, but not in the stack trace, or may not understand correctly the complex control flow in the program. To locate the origin of the exception, the developer must inspect the execution manually and attempt to understand the control flow through the calling methods. (2) An empirical study is designed to evaluate the effectiveness of our tool for localization null pointer exceptions

BACKGROUND
ASSIGNMENTS AND DEREFERENCES
EMPIRICAL STUDY
RELATED WORK
Findings
CONCLUSION AND FUTURE WORK
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call