Exceptions Can Be Nested: An Exploratory Study on Nested Exceptions in Java Crashes

IF 1.6 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Shaoting Liu, Haiyan Xu, Qi Xin, Jifeng Xuan
{"title":"Exceptions Can Be Nested: An Exploratory Study on Nested Exceptions in Java Crashes","authors":"Shaoting Liu,&nbsp;Haiyan Xu,&nbsp;Qi Xin,&nbsp;Jifeng Xuan","doi":"10.1002/smr.70099","DOIUrl":null,"url":null,"abstract":"<div>\n \n <p>Crash reports can be used to reproduce a crash scenario and to localize a fault. A nested exception report is a type of crash report with two or more exceptions, where one exception is triggered by another. The complexity of nested exception reports has primarily hindered the research progress of fault localization and crash reproduction. In this paper, we conduct an exploratory study on nested exceptions in Java programs by answering five research questions for the root cause of nested exceptions, including the data scale of nested exceptions, the concerns on nested exceptions, the correlated factors on concerns, the crash scenario of nested exceptions, and the simplification of nested exceptions. To support our study, we collect a dataset of crash reports with nested exceptions, called JCauseCrash dataset, which contains 1368 nested exception reports from 26 Java projects. Our study mainly shows five empirical results on the root cause of nested exceptions in Java programs. Our findings are listed as follows: (1) From the crash reports under evaluation, there are 1368 nested exception reports in the 26 Java projects, accounting for 30.80% of the crash reports (1368/3437); (2) programmers concern on nested exception reports more than non-nested ones; (3) the number of comments in nested exception reports correlates with the lifecycle of crash reports; (4) a parameterized constructor with an object of <span>Throwable</span> and the use of <span>throw</span> keyword highly correlates with the number of nested exception reports; and (5) without modifying the semantics of source code, programmers can simplify complex nested exception reports by eliminating a parameterized constructor with an object of <span>Throwable</span> class in the line of throwing an exception.</p>\n </div>","PeriodicalId":48898,"journal":{"name":"Journal of Software-Evolution and Process","volume":"38 4","pages":""},"PeriodicalIF":1.6000,"publicationDate":"2026-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Software-Evolution and Process","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1002/smr.70099","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Crash reports can be used to reproduce a crash scenario and to localize a fault. A nested exception report is a type of crash report with two or more exceptions, where one exception is triggered by another. The complexity of nested exception reports has primarily hindered the research progress of fault localization and crash reproduction. In this paper, we conduct an exploratory study on nested exceptions in Java programs by answering five research questions for the root cause of nested exceptions, including the data scale of nested exceptions, the concerns on nested exceptions, the correlated factors on concerns, the crash scenario of nested exceptions, and the simplification of nested exceptions. To support our study, we collect a dataset of crash reports with nested exceptions, called JCauseCrash dataset, which contains 1368 nested exception reports from 26 Java projects. Our study mainly shows five empirical results on the root cause of nested exceptions in Java programs. Our findings are listed as follows: (1) From the crash reports under evaluation, there are 1368 nested exception reports in the 26 Java projects, accounting for 30.80% of the crash reports (1368/3437); (2) programmers concern on nested exception reports more than non-nested ones; (3) the number of comments in nested exception reports correlates with the lifecycle of crash reports; (4) a parameterized constructor with an object of Throwable and the use of throw keyword highly correlates with the number of nested exception reports; and (5) without modifying the semantics of source code, programmers can simplify complex nested exception reports by eliminating a parameterized constructor with an object of Throwable class in the line of throwing an exception.

异常可以嵌套:Java崩溃中嵌套异常的探索性研究
崩溃报告可用于重现崩溃场景并对故障进行本地化。嵌套异常报告是一种带有两个或更多异常的崩溃报告,其中一个异常由另一个异常触发。嵌套异常报告的复杂性主要阻碍了故障定位和崩溃再现的研究进展。本文通过回答嵌套异常的数据规模、对嵌套异常的关注、关注的相关因素、嵌套异常的崩溃场景、嵌套异常的简化等五个研究问题,对Java程序中的嵌套异常进行探索性研究。为了支持我们的研究,我们收集了一个带有嵌套异常的崩溃报告数据集,称为JCauseCrash数据集,其中包含来自26个Java项目的1368个嵌套异常报告。我们的研究主要展示了Java程序中嵌套异常的根本原因的五个实证结果。我们的研究结果如下:(1)从评估的崩溃报告来看,26个Java项目中有1368个嵌套异常报告,占崩溃报告的30.80% (1368/3437);(2)程序员对嵌套异常报告的关注多于非嵌套异常报告;(3)嵌套异常报告中的注释数量与崩溃报告的生命周期相关;(4)带有Throwable对象的参数化构造函数和throw关键字的使用与嵌套异常报告的数量高度相关;(5)在不修改源代码语义的情况下,程序员可以通过在抛出异常的行中消除带有Throwable类对象的参数化构造函数来简化复杂的嵌套异常报告。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Software-Evolution and Process
Journal of Software-Evolution and Process COMPUTER SCIENCE, SOFTWARE ENGINEERING-
自引率
10.00%
发文量
109
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书