Runtime Exception Detection in Java Programs Using Symbolic Execution


Most of the runtime failures of a software system can be revealed during test execution only, which has a very high cost. In Java programs, runtime failures are manifested as unhandled runtime exceptions. In this paper we present an approach and tool for detecting runtime exceptions in Java programs without having to execute tests on the software. We use the symbolic execution technique to implement the approach. By executing the methods of the program symbolically we can determine those execution branches that throw exceptions. Our algorithm is able to generate concrete test inputs also that cause the program to fail in runtime. We used the Symbolic PathFinder extension of the Java PathFinder as the symbolic execution engine. Besides small example codes we evaluated our algorithm on three open source systems: jEdit, ArgoUML, and log4j. We found multiple errors in the log4j system that were also reported as real bugs in its bug tracking system.

Proceedings of the 13th Symposium on Programming Languages and Software Tools (SPLST 2013), Szeged, Hungary, Pages 215–229


    author    = {K\'ad\'ar, Istv\'an and Heged{\H{u}}s, P\'eter and Ferenc, Rudolf},
    title     = {Runtime Exception Detection in {J}ava Programs Using Symbolic Execution},
    booktitle = {Proceedings of the 13th Symposium on Programming Languages and Software Tools (SPLST 2013)},
    year      = {2013},
    pages     = {215--229},
    address   = {Szeged, Hungary},
    month     = aug,
    publisher = {University of Szeged},
    keywords  = {Java Runtime Exception, Symbolic Execution, Rule Checking, Java Virtual Machine},