On the Use of Context in Recommending Exception Handling Code Examples
Authors:
- Mohammad Masudur RahmanMRMohammad Masudur Rahman
- Chanchal K. RoyCRChanchal K. Roy
- 1 September 2014
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 285-294
Abstract
Studies show that software developers often either misuse exception handling features or use them inefficiently, and such a practice may lead an undergoing software project to a fragile, insecure and non-robust application system. In this paper, we propose a context-aware code recommendation approach that recommends exception handling code examples from a number of popular open source code repositories hosted at GitHub. It collects the code examples exploiting GitHub code search API, and then analyzes, filters and ranks them against the code under development in the IDE by leveraging not only the structural (i.e., graph-based) and lexical features but also the heuristic quality measures of exception handlers in the examples. Experiments with 4,400 code examples and 65 exception handling scenarios as well as comparisons with four existing approaches show that the proposed approach is highly promising.Keywords
All Related Versions
This publication has 13 references indexed in Scilit:
- Heuristic Strategies for Recommendation of Exception Handling Code2012
- A spontaneous code recommendation tool based on associative search2011
- Measuring Code Quality to Improve Specification MiningIEEE Transactions on Software Engineering, 2011
- Learning a Metric for Code ReadabilityIEEE Transactions on Software Engineering, 2009
- Graph-based mining of multiple object usage patterns2009
- Sourcerer: An internet-scale software repository2009
- Static analysis to support the evolution of exception structure in object-oriented systemsACM Transactions on Software Engineering and Methodology, 2003
- A comparative study of exception handling mechanisms for building dependable object-oriented softwareJournal of Systems and Software, 2001
- Interprocedural exception analysis for Java2001
- Exception handlingCommunications of the ACM, 1975