IdenEH: Identify error-handling code snippets in large-scale software

Error-handling (EH) code snippets are widely used for troubleshooting in software projects. Analyzing these snippets help to better understand how developers handle errors. However, the identification of such error-handling code snippets from the large-scale software is non-trivial, since traditional methods meet a challenge of scalability. In this paper, we analyze a large number of error-handling code snippets and get same interesting and useful observations. We extract seven features according to these observations. Based on these features, we design an automatic approach to identify error-handling codes using static program analysis and machine learning algorithms. Finally, we evaluate this approach and select the optimal feature subset from all feature combinations. Our evaluation demonstrates the high F-Score of up to 0.85 in identifying error-handling code snippets.

[1]  Suman Saha,et al.  An approach to improving the structure of error-handling code in the linux kernel , 2011, LCTES '11.

[2]  Martin P. Robillard,et al.  Regaining Control of Exception Handling , 1999 .

[3]  Paulo Marques,et al.  Exception Handling: A Field Study in Java and .NET , 2007, ECOOP.

[4]  Yuanyuan Zhou,et al.  Do not blame users for misconfigurations , 2013, SOSP.

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

[6]  Gustavo Alonso,et al.  Exception Handling in Workflow Management Systems , 2000, IEEE Trans. Software Eng..

[7]  George C. Necula,et al.  Finding and preventing run-time error handling mistakes , 2004, OOPSLA.

[8]  Gustavo Alonso,et al.  Flexible exception handling in the OPERA process support system , 1998, Proceedings. 18th International Conference on Distributed Computing Systems (Cat. No.98CB36183).

[9]  Cristina V. Lopes,et al.  A study on exception detection and handling using aspect-oriented programming , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[10]  Mira Mezini,et al.  A recommendation system for exception handling code , 2012, 2012 5th International Workshop on Exception Handling (WEH).

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

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

[13]  Cecília M. F. Rubira,et al.  A comparative study of exception handling mechanisms for building dependable object-oriented software , 2001, J. Syst. Softw..