Static Detection Unsafe Use of variables In Java

Authors:
  • XWXiaoquan Wu
    Xiaoquan Wu
  • JWJun Wei
    Jun Wei

Abstract
Exception handling has been introduced into object oriented programming languages to help developing robust software. At the same time, it makes programming more difficult and it is not easy to write high quality exception handling codes. Careless exception handling code will introduce bugs and it usually forms certain kind of bug pattern. In this paper we propose a new bug pattern unsafe use of variables due to exception occurrences. It may cause the dependency safety property violation in a program. We also develop a static approach to automatically detect unsafe use of variables that may introduce potential bugs in Java program. This approach can be integrated into current bug finding tools to help developer improve the quality of Java program.