ABSTRACT
This paper presents an empirical study of exception handling strategies in Java libraries. The study conducts an integrated analysis of exception flows and handler actions from Java libraries with the aim to understand the impact of adopted exception handling strategies from the perspective of libraries' users. We extended an existing static analysis tool to identify exception flows in software libraries and collected data from the eight most downloaded Java libraries in Maven repository. After that, manual analysis was performed to categorize the tailored handler actions for each exception handler. Our results show that a high number of uncaught runtime exceptions and subsumption handlers were applied in some libraries. We also investigated the community anti-patterns implemented by handler actions in exception flows. Our results reveal the need to have automated support to allow the integrated analysis of exception flows and their handler actions explicitly.
- Cabral, B., and Marques, P. (2007). Exception Handling: A Field Study in Java and .NET. ECOOP 2007 - Object-Oriented Programming, 151--175. Google ScholarDigital Library
- Coelho, R., Rashid, A. G., Ferrari, F., Cacho, N., Kulesza, U., Staa, A., and Lucena, C. (2008). Assessing the Impact of Aspects on Exception Flows: An Exploratory Study. Proceedings of the 22nd European Conference on Object-Oriented, 207--234. Google ScholarDigital Library
- Sawadpong, P., Allen, B. E., and Willians, J. B. (2012). Exception Handling Defects: An Empirical Study. 14th International Symposium on High-Assurance Systems Engineering, pp. 90--97. Google ScholarDigital Library
- Robillard, M. P., and Murphy, G. C. (2003). Static Analysis to Support the Evolution of Exception Structure in Object-Oriented Systems. ACM Transactions on Software Engineering and Methodology (TOSEM), pp. 191--221. Google ScholarDigital Library
- Gosling, J. (2000). The Java Language Specification. Addison-Wesley Professional. Google ScholarDigital Library
- Miller, R., and Tripathi, A. (1997). Issues with Exception Handling in Object-Oriented Systems. ECOOP'97 - Object-Oriented Programming, 85--103.Google Scholar
- Melo, H., Coelho, R., Kulesza, U., & Sena, D. (2013). In-depth Characterization of Exception Flows in Software Product Lines: An Empirical Study. Journal of Software Engineering Research and Development.Google Scholar
- Bacon, D. F., & Sweeney, P. F. (6-10 de Oct de 1996). Fast Static Analysis of C++ Virtual Function Calls. Conference on Object-Oriented Programming Systems, Languages and Applications, pp. 324--341. Google ScholarDigital Library
- Shivers, O. (May de 1991). Control-Flow Analysis of High-Order Languages. PhD thesis, Carnegie-Mellon University, 1991. CMU-CS-91-145. Google ScholarDigital Library
- Robillard, M. P., and Murphy, G. C. (2000). Designing Robust Java Programs with Exceptions. International Conference on the Foundations of Software Engineering (FSE), pp. 2--10. Google ScholarDigital Library
- Rebecca J Wirfs-Brock. Towards Exception-Handling Best Practices and Patterns. IEEE Software, V 23 (5), IEEE Computer Society, pp. 11--13. Google ScholarDigital Library
- McCune, T. (04 de 06 de 2006). Exception Handling Antipatterns. Retrieve August 21, 2015, from java.net: http://today.java.net/pub/a/today/2006/04/06/exception-handling-antipatterns.htmlGoogle Scholar
- Gulwani, S., & Necula, G. C. (2005). Precise Interprocedural Analysis using Random Interpretation. Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 324--337. Google ScholarDigital Library
- Fu, C., & Ryder, B. G. (2007). Exception-Chain Analysis: Revealing Exception Handling Architecture in Java Server Applications. International Conference on Software Engineering (ICSE 2007), pp. 230--239. Google ScholarDigital Library
- Chang, B.-M., Jo, J.-W., and Her, H. S. (2002). Visualization of Exception Propagation for Java using static analysis. Proceedings Second IEEE Internation Workshop on Source Code Analysis and Manipulation, pp. 173--182. Google ScholarDigital Library
- Sinha, S., Orso, A., & Harrold, M. J. (23 de May de 2004). Automated Support for Development, Maintenance and Testing in the Presence of Implicit Control Flow. Proceedings in 26th International Conference on Software Engineering, pp. 336--345. Google ScholarDigital Library
- Rahman, M. M., & Roy, C. K. (2014). On the Use of Context in Recommending Exception Handling Code Examples. IEEE 14th International Working Conference on Source Code Analysis and Manipulation, pp. 285--294. Google ScholarDigital Library
- Barbosa, E. A., Garcia, A., & Mezini, M. (2012). Heuristic Strategies for Recommendation of Exception Handling Code. 26th Brazilian Symposium on Software Engineering, pp. 171--180. Google ScholarDigital Library
- Thummalapenta, S., and Xie, T. (2009). Mining Exception-handling Rules As Sequence Association Rules. Proceedings of the 31st International Conference on Software Engineering, pp. 496--506. Google ScholarDigital Library
- Shah, H., Gorg, C., and Harrold, M. J. (2008). Visualization of Exception Handling Constructs to Support Program Understanding. Proceedings of the 4th ACM Symposium on Software Visualization, pp. 19--28. Google ScholarDigital Library
- Fu, C., and Ryder, B. G. (2005). Navigating Error Recovery Code in Java Applications. Proceeding Eclipse'05 Proceedings of the 2005 OOPSLA Workshop on Eclipse Technology Exchange, pp. 40--44. Google ScholarDigital Library
Index Terms
- Integrated analysis of exception flows and handler actions in Java libraries: an empirical study
Recommendations
Understanding the exception handling strategies of Java libraries: an empirical study
MSR '16: Proceedings of the 13th International Conference on Mining Software RepositoriesThis paper presents an empirical study whose goal was to investigate the exception handling strategies adopted by Java libraries and their potential impact on the client applications. In this study, exception flow analysis was used in combination with ...
An investigation on the evolutionary nature of exception handling violations in software product lines
SAC '15: Proceedings of the 30th Annual ACM Symposium on Applied ComputingThe Exception Handling (EH) is a widely used mechanism for building robust systems and it is embedded in most of the mainstream programming languages. In the context of Software Product Lines (SPL), we can find exception handling code associated to ...
An Empirical Study of Exception Handling Bugs and Fixes
ACM SE '19: Proceedings of the 2019 ACM Southeast ConferenceModern programming languages often provide a mechanism for programmers to handle exceptions, i.e., unexpected errors occurring while a software system is running. Failing to catch and handle exceptions properly often leads to serious issues such as ...
Comments