Division by Zero: Threats and Effects in Spectrum-Based Fault Localization Formulas

Dániel Vince, Attila Szatmári, Ákos Kiss and Árpád Beszédes
Spectrum-Based Fault Localization (SBFL) is based on risk formulas to rank program elements, which work generally well in various situations. However, it cannot be ruled out that zero division might happen during score calculation, which has negative consequences, e.g., essential elements will not be in the top part of the rank list. The literature has given several strategies to tackle the problem, although there is little knowledge on which one to use. In our work, we performed mathematical analysis and an empirical study to find out how this phenomenon affects SBFL. Results show that division by zero happens in many cases, and the strategies can mitigate their consequences with varying success. Thus, we propose a combined method to avoid the threat of division by zero and improve the trustworthiness of SBFL. Our proposals should be taken into consideration whenever a formula
is being used or a new one is proposed.

Keywords:     Debugging, Division by Zero, Empirical, Fault Localization, Spectrum-based Fault Localization