Skip to main content

Analyzing Exception Flow in Java™ Programs

  • Conference paper
  • First Online:
Software Engineering — ESEC/FSE ’99 (ESEC 1999, SIGSOFT FSE 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1687))

Abstract

Exception handling mechanisms provided by programming languages are intended to ease the difficulty of developing robust software systems. Using these mechanisms, a software developer can describe the exceptional conditions a module might raise, and the response of the module to exceptional conditions that may occur as it is executing. Creating a robust system from such a localized view requires a developer to reason about the flow of exceptions across modules. The use of unchecked exceptions, and in object-oriented languages, subsumption, makes it difficult for a software developer to perform this reasoning manually. In this paper, we describe a tool called Jex that analyzes the flow of exceptions in Java code to produce views of the exception structure. We demonstrate how Jex can help a developer identify program points where exceptions are caught accidentally, where there is an opportunity to add finer-grained recovery code, and where error-handling policies are not being followed.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Martín Abadi and Luca Cardelli. A Theory of Objects. Springer, 1996.

    Google Scholar 

  2. Jong-Deok Choi, David Grove, Michael Hind, and Vivek Sarkar. Efficient and precise modeling of exceptions for the analysis of Java programs. In ACM SIGPLANSIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE’99), September 1999. To appear.

    Google Scholar 

  3. Manuel Fahndrich, Jeffrey Foster, Jason Cu, and Alexander Aiken. Tracking down exceptions in standard ML programs. Technical Report CSD-98-996, University of California, Berkeley, February 1998.

    Google Scholar 

  4. John B. Goodenough. Exception handling: Issues and proposed notation. Communications of the ACM, 18(12):683–696, December 1975.

    Article  MathSciNet  Google Scholar 

  5. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley Longman, Inc., 1996.

    Google Scholar 

  6. Robert Harper, Robin Milner, and Mads Tofte. The Definition of Standard ML: Version 3. Technical Report ECS-LFCS-89-81, Laboratory for the Foundations of Computer Science, University of Edinburgh, May 1989.

    Google Scholar 

  7. Nevin Heintze. Set-Based Program Analysis. PhD thesis, Carnegie-Mellon University, Pittsburgh, PA, USA, October 1992.

    Google Scholar 

  8. Mik A. Kersten and Gail C. Murphy. Atlas: A case study in building a web-based learning environment using aspect-oriented programming. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages, and Applications, 1999. To appear.

    Google Scholar 

  9. Barbara H. Liskov and Alan Snyder. Exception handling in CLU. IEEE Transactions on Software Engineering, 5(6):546–558, November 1979.

    Article  Google Scholar 

  10. Robert Miller and Anand Tripathi. Issues with exception handling in object-oriented systems. In Proceedings of the 11th European Conference on Object-Oriented Programming, volume 1241 of Lecture Notes in Computer Science, pages 85–103. Springer-Verlag, June 1997.

    Google Scholar 

  11. Saurabh Sinha and Mary Jean Harrold. Analysis of programs with exception-handling constructs. In Proceedings of the International Conference on Software Maintenance, pages 348–357, November 1998.

    Google Scholar 

  12. Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, 2nd edition, 1991.

    Google Scholar 

  13. Sun Microsystems, Inc. The Java Parser Generator. http://www.suntest.com/JavaCC/.

  14. Kwangkeun Yi. Compile-time detection of uncaught exceptions in standard ML programs. In Proceedings of the First International Static Analysis Symposium, volume 864 of Lecture Notes in Computer Science, pages 238–254. Springer-Verlag, 1994.

    Google Scholar 

  15. Kwangkeun Yi. An abstract interpretation for estimating uncaught exceptions in standard ML programs. Science of Computer Programming, 31:147–173, 1998.

    Article  MathSciNet  Google Scholar 

  16. Kwangkeun Yi and Byeong-Mo Chang. Exception analysis for Java. In ECOOP’99 Workshop on Formal Techniques for Java Programs, June 1999. To appear.

    Google Scholar 

  17. Kwangkeun Yi and Sukyoung Ryu. Towards a cost-effective estimation of uncaught exceptions in SML programs. In Proceedings of the 4th International Static Analysis Symposium, volume 1302 of Lecture Notes in Computer Science, pages 98–113, September 1997.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Robillard, M.P., Murphy, G.C. (1999). Analyzing Exception Flow in Java™ Programs. In: Nierstrasz, O., Lemoine, M. (eds) Software Engineering — ESEC/FSE ’99. ESEC SIGSOFT FSE 1999 1999. Lecture Notes in Computer Science, vol 1687. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48166-4_20

Download citation

  • DOI: https://doi.org/10.1007/3-540-48166-4_20

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66538-0

  • Online ISBN: 978-3-540-48166-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics