Spectrum‐Based Techniques for Software Fault Localization
W. Eric Wong, Hua Jie Lee, Ruizhi Gao, Lee Naish · 2023
Spectrum-based fault localization (SBFL) is a typical approach in dynamic analysis. It consists of information on the parts of a program that are executed during the test case executions. This chapter introduces the concepts of program spectra and SBFL. It describes spectra metrics, their characteristics, and equivalences of some spectra metrics. Choosing a good metric to compute the suspiciousness is important. Unfortunately, no single metric is good for all scenarios. To solve this problem, the chapter addresses the following three issues: cost of using a metric, optimality for programs with a single bug, and optimality for programs with deterministic bugs. It describes how spectra-based metrics can be used for fault localization, and how to improve their effectiveness by reducing the code that needs to be examined to locate program bugs. The chapter explains different refinements studies of SBFL, and presents empirical evaluation.