Heuristic Strategies for Recommendation of Exception Handling Code

Software developers have difficulties in implementing exception handling code in their systems. In particular, they fail in implementing appropriate handling actions. Not surprisingly, recurring failures and performance issues are often related to the poor exception handling actions implemented in real software systems. In this paper we propose, implement and evaluate a set of three heuristic strategies used to recommend exception handling code in programming tasks. Given a method in which the developer wants to handle an exception, the heuristics recommend a list of code fragments implementing exception handling. The heuristics' goal is to accurately find code fragments implementing exception handling and recommend these fragments according to the context of developers' implementation task. Hence, the proposed heuristics may assist developers in the process of discovering exception handling actions relevant to their context by providing concrete examples. We believe that a recommender system based on the proposed heuristics may be used in the future as a tool for aiding exception handling implementation.

[1]  Carlos José Pereira de Lucena,et al.  Assessing the Impact of Aspects on Exception Flows: An Exploratory Study , 2008, ECOOP.

[2]  Alessandro Garcia,et al.  Analyzing Exceptional Interfaces on Evolving Frameworks , 2011, 2011 Fifth Latin-American Symposium on Dependable Computing Workshops.

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

[4]  Westley Weimer,et al.  Synthesizing API usage examples , 2012, 2012 34th International Conference on Software Engineering (ICSE).

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

[6]  John B. Goodenough,et al.  Exception handling: issues and a proposed notation , 1975, CACM.

[7]  Ewan D. Tempero,et al.  Understanding the shape of Java software , 2006, OOPSLA '06.

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

[9]  Yu Chin Cheng,et al.  Elsevier Editorial System(tm) for Journal of Systems and Software Manuscript Draft Exception Handling Refactorings: Directed by Goals and Driven by Bug Fixing , 2022 .

[10]  Mira Mezini,et al.  Mining subclassing directives to improve framework reuse , 2010, 2010 7th IEEE Working Conference on Mining Software Repositories (MSR 2010).

[11]  Sushil Krishna Bajracharya,et al.  SourcererDB: An aggregated repository of statically analyzed and cross-linked open source Java projects , 2009, 2009 6th IEEE International Working Conference on Mining Software Repositories.

[12]  Carl E. Landwehr,et al.  Basic concepts and taxonomy of dependable and secure computing , 2004, IEEE Transactions on Dependable and Secure Computing.

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

[14]  Kwangkeun Yi,et al.  Interprocedural exception analysis for Java , 2001, SAC.

[15]  Hinrich Schütze,et al.  Introduction to information retrieval , 2008 .

[16]  Robert J. Walker,et al.  Approximate Structural Context Matching: An Approach to Recommend Relevant Examples , 2006, IEEE Transactions on Software Engineering.

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

[18]  Alessandro F. Garcia,et al.  On the Relevance of Code Anomalies for Identifying Architecture Degradation Symptoms , 2012, 2012 16th European Conference on Software Maintenance and Reengineering.