Should We Beware the Exceptions? An Empirical Study on the Eclipse Project

Exception handling is a mechanism that highlights exceptional functionality of software systems. Currently there are empirical studies pointing out that design entities (classes) that use exceptions are more defect prone than the other classes and sometimes developers neglect exceptional functionality, minimizing its importance. In this paper we investigate if classes that use exceptions are the most complex classes from software systems and, consequently, have an increased likelihood to exhibit defects. We also detect two types of improper usages of exceptions in three releases of Eclipse and investigate the relations between classes that handle/do not handle properly exceptions and the defects those classes exhibit. The results show that (i) classes that use exceptions are more complex than the other classes and (ii) classes that handle improperly the exceptions in the source code exhibit an increased likelihood of exhibiting defects than classes which handle them properly. Based on the provided evidence, practitioners get knowledge about the correlations between exceptions and complexity and are advised once again about the negative impact deviations from best programming practices have at a source code level.

[1]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[2]  SinghYogesh,et al.  Empirical validation of object-oriented metrics for predicting fault proneness models , 2010 .

[3]  Cristina Marinescu,et al.  Are the Clients of Flawed Classes (Also) Defect Prone? , 2011, 2011 IEEE 11th International Working Conference on Source Code Analysis and Manipulation.

[4]  Michael Mortensen Hewlett-Packard Refactoring Idiomatic Exception Handling in C + + : Throwing and Catching Exceptions with Aspects , 2007 .

[5]  Hina Shah,et al.  Understanding Exception Handling: Viewpoints of Novices and Experts , 2010, IEEE Transactions on Software Engineering.

[6]  Arvinder Kaur,et al.  Empirical validation of object-oriented metrics for predicting fault proneness models , 2010, Software Quality Journal.

[7]  Arie van Deursen,et al.  Discovering faults in idiom-based exception handling , 2006, ICSE '06.

[8]  A. Zeller,et al.  Predicting Defects for Eclipse , 2007, Third International Workshop on Predictor Models in Software Engineering (PROMISE'07: ICSE Workshops 2007).

[9]  Cristina Marinescu,et al.  iPlasma: An Integrated Platform for Quality Assessment of Object-Oriented Design , 2005, ICSM.

[10]  Chen Fu,et al.  Exception-Chain Analysis: Revealing Exception Handling Architecture in Java Server Applications , 2007, 29th International Conference on Software Engineering (ICSE'07).

[11]  Lionel C. Briand,et al.  Replicated Case Studies for Investigating Quality Factors in Object-Oriented Designs , 2001, Empirical Software Engineering.

[12]  Letha H. Etzkorn,et al.  Empirical Validation of Three Software Metrics Suites to Predict Fault-Proneness of Object-Oriented Classes Developed Using Highly Iterative or Agile Software Development Processes , 2007, IEEE Transactions on Software Engineering.

[13]  Raed Shatnawi,et al.  An empirical study of the bad smells and class error probability in the post-release object-oriented system evolution , 2007, J. Syst. Softw..

[14]  D. Whitehead Case Study Research Design and Methods, 3rd edition , 2003 .

[15]  Saurabh Sinha,et al.  Analysis and Testing of Programs with Exception Handling Constructs , 2000, IEEE Trans. Software Eng..

[16]  R Core Team,et al.  R: A language and environment for statistical computing. , 2014 .

[17]  Thomas J. Ostrand,et al.  \{PROMISE\} Repository of empirical software engineering data , 2007 .

[18]  Magiel Bruntink,et al.  Reengineering Idiomatic Exception Handling in Legacy C Code , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[19]  Cristina Marinescu Are the classes that use exceptions defect prone? , 2011, IWPSE-EVOL '11.

[20]  Martin P. Robillard,et al.  Static analysis to support the evolution of exception structure in object-oriented systems , 2003, TSEM.

[21]  Tibor Gyimóthy,et al.  Empirical validation of object-oriented metrics on open source software for fault prediction , 2005, IEEE Transactions on Software Engineering.

[22]  D. Sheskin Handbook of Parametric and Nonparametric Statistical Procedures: Third Edition , 2000 .

[23]  Rebecca Wirfs-Brock Toward Exception-Handling Best Practices and Patterns , 2006, IEEE Software.