Skip to main content

Exercising Java Exceptions Using Java Pathfinder and Program Instrumentation

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8579))

Abstract

This paper presents an instrumentation technique to exercise the exceptional behavior of Java programs using the Java Pathfinder model checker. First, programs statements that are potentially able to throw exceptions are identified, and then a set of Java instructions are inserted into programs source code to throw exceptions, producing an instrumented program. Java Pathfinder is applied over this instrumented code to perform multiple executions of the system under verification and cover the program exceptional behavior. Additionally, our technique proposes a prototype of a new Java Pathfinder class to verify and test Java exceptions.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ammann, P., Offutt, J.: Introduction to Software Testing, 1st edn. Cambridge University Press, New York (2008)

    Book  MATH  Google Scholar 

  2. Artho, C., Sommer, C., Honiden, S.: Model Checking Networked Programs in the Presence of Transmission Failures. In: Proceedings of the First Joint IEEE/IFIP Symposium on Theoretical Aspects of Software Engineering, TASE 2007, pp. 219–228. IEEE Computer Society, Washington, DC (2007)

    Google Scholar 

  3. Baier, C., Katoen, J.-P.: Principles of Model Checking (Representation and Mind Series). The MIT Press (2008)

    Google Scholar 

  4. Cabral, B., Marques, P.: Exception Handling: A Field Study in Java and .NET. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 151–175. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  5. Dúulaigh, K.O., Power, J.F., Clarke, P.J.: Measurement of Exception-Handling Code: An Exploratory Study. In: 5th International Workshop on Exception Handling, Zurich, Switzerland (June 9, 2012)

    Google Scholar 

  6. Fisher, M.: An Introduction to Practical formal Methods Using Temporal Logic, 1st edn. Wiley (2011)

    Google Scholar 

  7. Fraser, G., Wotawa, F., Ammann, P.E.: Testing with model checkers: a survey. Softw. Test. Verif. Reliab. 19, 215–261 (2009)

    Article  Google Scholar 

  8. Ji, C., Chen, Z., Xu, B., Wang, Z.: A New Mutation Analysis Method for Testing Java Exception Handling. In: 2012 IEEE 36th Annual Computer Software and Applications Conference, vol. 2, pp. 556–561 (2009)

    Google Scholar 

  9. Li, X., Hoover, H.J., Rudnicki, P.: Towards Automatic Exception Safety Verification. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 396–411. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  10. Martins, A.L., Hanazumi, S., de Melo, A.C.V.: Testing Java Exceptions: An Instrumentation Technique. In: Proceedings of the 2014 IEEE 38th Annual Computer Software and Applications Conference Workshops, COMPSACW 2014, IEEE Computer Society, Väasteråas (to appear, 2014)

    Google Scholar 

  11. Mathur, A.P.: Foundations of Software Testing, 1st edn. Addison-Wesley Professional (2008)

    Google Scholar 

  12. Nagar, P., Soni, N.: Optimizing Program-States using Exception-handling Constructs in Java. International Journal of Engineering Science & Advanced Technology 2(2), 192–199 (2012)

    Google Scholar 

  13. NASA, What is JPF, http://babelfish.arc.nasa.gov/trac/jpf/wiki/intro/what_is_jpf (accessed: November 25, 2012)

  14. Oracle. What Is an Exception? http://docs.oracle.com/javase/tutorial/essential/exceptions/definition.html (accessed: November 25, 2012)

  15. Sebesta, R.W.: Concepts Programming Languages (7th ed.). Addison-Wesley Longman Publishing Co., Inc., Boston (2005)

    Google Scholar 

  16. Sinha, S., Harrold, M.J.: Analysis of Programs with Exception-Handling Constructs. In: ICSM 1998: Proceedings of the International Conference on Software Maintenance, p. 348. IEEE Computer Society, USA (1998)

    Google Scholar 

  17. Sinha, S., Harrold, M.J.: Analysis and Testing of Programs with Exception Handling Constructs. IEEE Trans. Softw. Eng. 26(9), 849–871 (2000)

    Article  Google Scholar 

  18. Staats, M.: Towards a Framework for Generating Tests to Satisfy Complex Code Coverage in Java Pathfinder. In: Proceedings of NASA Formal Methods Symposium 2009, p. 116 (2009)

    Google Scholar 

  19. Zhang, P., Elbaum, S.: Amplifying tests to validate exception handling code. In: Proceedings of the 2012 International Conference on Software Engineering, ICSE 2012, pp. 595–605. IEEE Press, Piscataway (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Martins, A.L., Hanazumi, S., de Melo, A.C.V. (2014). Exercising Java Exceptions Using Java Pathfinder and Program Instrumentation. In: Murgante, B., et al. Computational Science and Its Applications – ICCSA 2014. ICCSA 2014. Lecture Notes in Computer Science, vol 8579. Springer, Cham. https://doi.org/10.1007/978-3-319-09144-0_46

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-09144-0_46

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-09143-3

  • Online ISBN: 978-3-319-09144-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics