An uncaught exception analysis for Java

  • Authors:
  • Jang-Wu Jo;Byeong-Mo Chang;Kwangkeun Yi;Kwang-Moo Choe

  • Affiliations:
  • Department of Computer Engineering, Pusan University of Foreign Studies, 55-1, Uam-dong, Nam-gu, Pusan 608-738, Republic of Korea;Department of Information Science, Sookmyung Women's University, Seoul 140-742, Republic of Korea;Department of Computer Science, Korea Advanced Institute of Science and Technology, Daejon 305-701, Republic of Korea;Department of Computer Science, Korea Advanced Institute of Science and Technology, Daejon 305-701, Republic of Korea

  • Venue:
  • Journal of Systems and Software
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Current JDK Java compiler relies on programmer's declarations (by throws clauses) for checking against uncaught exceptions of the input program. It is not elaborate enough to remove programmer's unnecessary handlers nor suggest to programmers for specialized handlings (when programmer's declarations are too broad). We propose a static analysis of Java programs that estimates their uncaught exceptions independently of the programmer's declarations. This analysis is designed and implemented based on set-based framework. Its cost-effectiveness is suggested by sparsely analyzing the program at method level (hence reducing the number of unknowns in the flow equations). We have shown that our interprocedural exception analysis is more precise than JDK-style intraprocedural analysis, and also that our analysis can effectively detect uncaught exceptions for realistic Java programs.