Contrasting exception handling code across languages: An experience report involving 50 open source projects
B Jakobus, EA Barbosa, A Garcia… - 2015 IEEE 26th …, 2015 - ieeexplore.ieee.org
2015 IEEE 26th International Symposium on Software Reliability …, 2015•ieeexplore.ieee.org
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 (eg Java try
blocks) and exception handlers (eg 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 …
effort to help deal with runtime irregularities. These mechanisms aim to improve code
reliability by providing constructs for sectioning code into exception scopes (eg Java try
blocks) and exception handlers (eg 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 …
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.
ieeexplore.ieee.org
Showing the best result for this search. See all results