Cut to the Chase: An Error-Oriented Approach to Detect Error-Handling Bugs

Author:

Liu Haoran1ORCID,Jia Zhouyang1ORCID,Li Shanshan1ORCID,Lei Yan2ORCID,Yu Yue1ORCID,Jiang Yu3ORCID,Mao Xiaoguang1ORCID,Liao Xiangke1ORCID

Affiliation:

1. National University of Defense Technology, Changsha, China

2. Chongqing University, Chongqing, China

3. Tsinghua University, Changsha, China

Abstract

Error-handling bugs are prevalent in software systems and can result in severe consequences. Existing works on error-handling bug detection can be categorized into template-based and learning-based approaches. The former requires much human effort and is difficult to accommodate the software evolution. The latter usually focuses on errors of API and assumes that error handling should be right after the handled error. Such an assumption, however, may affect both learning and detecting phases. The existing learning-based approaches can be regarded as API-oriented, which starts from an API and learns if the API requires error handling. In this paper, we propose EH-Digger, an ERROR-oriented approach, which starts from an error handling. Our approach can learn why the error occurs and when the error has to be handled. We conduct a comprehensive study on 2,322 error-handling code snippets from 22 widely used software systems across 8 software domains to reveal the limitation of existing approaches and guide the design of EH-Digger. We evaluated EH-Digger on the Linux Kernel and 11 open-source applications. It detected 53 new bugs confirmed by the developers and 71 historical bugs fixed in the latest versions. We also compared EH-Digger with three state-of-the-art approaches, 30.1% of bugs detected by EH-Digger cannot be detected by the existing approaches.

Funder

NSFC

the Science and Technology Innovation Program of Hunan Province

Publisher

Association for Computing Machinery (ACM)

Reference51 articles.

1. Mithun Acharya and Tao Xie. 2009. Mining API error-handling specifications from source code. In International Conference on Fundamental Approaches to Software Engineering. 370–384.

2. Global-aware recommendations for repairing violations in exception handling

3. Detecting Bugs by Discovering Expectations and Their Violations

4. Islem Bouzenia. 2022. Detecting Inconsistencies in If-Condition-Raise Statements. In 37th IEEE/ACM International Conference on Automated Software Engineering. 1–3.

5. M. Brunsfeld. 2023. Tree-sitter. https://tree-sitter.github.io/tree-sitter/ Accessed 1. October 2021

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3