DocumentCode :
3730226
Title :
Contrasting exception handling code across languages: An experience report involving 50 open source projects
Author :
Benjamin Jakobus;Eiji Adachi Barbosa;Alessandro Garcia;Carlos Jos? Pereira de Lucena
Author_Institution :
OPUS Research Group, Informatics Department, Pontifical Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil
fYear :
2015
Firstpage :
183
Lastpage :
193
Abstract :
Exception handling mechanisms have been introduced into programming languages in an effort to help deal with runtime irregularities. These mechanisms aim to improve code reliability by providing constructs for sectioning code into exception scopes (e.g. Java try blocks) and exception handlers (e.g. Java catch blocks). Whilst exception handling mechanisms have been the focus of much research over the past years, empirical studies have only focused on characterising exception handling code of Java and C# programs. There exists little empirical evidence on how exception handling mechanisms are used to develop software with other programming languages. Moreover, to date there exists no empirical study which has examined the structure of exception scopes across software projects. We address these shortcomings by examining the commonalities and differences of both exception scopes and handlers implemented with a wider range of languages. To this end, we analysed 50 software projects, containing code developed in C++, JavaScript, PHP, Java and C#. More than 9 million lines of code and over 20,000 exceptional code blocks were analysed. Our findings revealed significant differences in the frequency, structure and length of exception scopes and exception handlers across languages. This finding suggests that certain exception handling mechanisms are less explored by programmers using certain programming languages. However, regardless of language, exception handlers remained simplistic and in general only ever one handler was associated with each scope. Finally, our analysis confirms the existing belief that developers often pay little attention to developing exception scoping and handling behaviour.
Keywords :
"Java","Reliability","Indexes","Software","Runtime","Informatics"
Publisher :
ieee
Conference_Titel :
Software Reliability Engineering (ISSRE), 2015 IEEE 26th International Symposium on
Type :
conf
DOI :
10.1109/ISSRE.2015.7381812
Filename :
7381812
Link To Document :
بازگشت