SBEST: Spectrum-Based Fault Localization Without Fault-Triggering Tests

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Rafi, Md Nakhla, Pacheco, Lorena Barreto Simedo, Chen, An Ran, Yang, Jinqiu, Tse-Hsun, Chen
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917043360497664
author Rafi, Md Nakhla
Pacheco, Lorena Barreto Simedo
Chen, An Ran
Yang, Jinqiu
Tse-Hsun
Chen
author_facet Rafi, Md Nakhla
Pacheco, Lorena Barreto Simedo
Chen, An Ran
Yang, Jinqiu
Tse-Hsun
Chen
contents Fault localization is a critical step in software maintenance. Yet, many existing techniques, such as Spectrum-Based Fault Localization (SBFL), rely heavily on the availability of fault-triggering tests to be effective. In practice, especially for crash-related bugs, such tests are frequently unavailable. Meanwhile, bug reports containing stack traces often serve as the only available evidence of runtime failures and provide valuable context for debugging. This study investigates the feasibility of using stack traces from crash reports as proxies for fault-triggering tests in SBFL. Our empirical analysis of 60 crash-report bugs in Defects4J reveals that only 3.33% of these bugs have fault-triggering tests available at the time of the bug report creation. However, 98.3% of bug fixes directly address the exception observed in the stack trace, and 78.3% of buggy methods are reachable within an average of 0.34 method calls from the stack trace. These findings underscore the diagnostic value of stack traces in the absence of failing tests. Motivated by these findings, we propose SBEST, a novel approach that integrates stack trace information with test coverage data to perform fault localization when fault-triggering tests are missing. SBEST shows an improvement, with a 32.22% increase in Mean Average Precision (MAP) and a 17.43% increase in Mean Reciprocal Rank (MRR) compared to baseline approaches under the scenario where fault-triggering tests are absent.
format Preprint
id arxiv_https___arxiv_org_abs_2405_00565
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle SBEST: Spectrum-Based Fault Localization Without Fault-Triggering Tests
Rafi, Md Nakhla
Pacheco, Lorena Barreto Simedo
Chen, An Ran
Yang, Jinqiu
Tse-Hsun
Chen
Software Engineering
Fault localization is a critical step in software maintenance. Yet, many existing techniques, such as Spectrum-Based Fault Localization (SBFL), rely heavily on the availability of fault-triggering tests to be effective. In practice, especially for crash-related bugs, such tests are frequently unavailable. Meanwhile, bug reports containing stack traces often serve as the only available evidence of runtime failures and provide valuable context for debugging. This study investigates the feasibility of using stack traces from crash reports as proxies for fault-triggering tests in SBFL. Our empirical analysis of 60 crash-report bugs in Defects4J reveals that only 3.33% of these bugs have fault-triggering tests available at the time of the bug report creation. However, 98.3% of bug fixes directly address the exception observed in the stack trace, and 78.3% of buggy methods are reachable within an average of 0.34 method calls from the stack trace. These findings underscore the diagnostic value of stack traces in the absence of failing tests. Motivated by these findings, we propose SBEST, a novel approach that integrates stack trace information with test coverage data to perform fault localization when fault-triggering tests are missing. SBEST shows an improvement, with a 32.22% increase in Mean Average Precision (MAP) and a 17.43% increase in Mean Reciprocal Rank (MRR) compared to baseline approaches under the scenario where fault-triggering tests are absent.
title SBEST: Spectrum-Based Fault Localization Without Fault-Triggering Tests
topic Software Engineering
url https://arxiv.org/abs/2405.00565