Weighted Call Frequency-Based Fault Localization

Attila Szatmári, Aondowase James Orban, Tamás Gergely · 2025

Spectrum-based fault localization is an automated technique that helps developers identify and isolate the origin of suspicious errors during software development. Despite being a well-researched topic, it is rarely used in the industry. The primary reason is that, in its basic version, it uses only local information on the coverage of a program element to estimate its probability of failure, rarely utilizing additional contextual information on the element or the test cases. Other researchers have tried solving the problem using contextual information with varying success. In this paper, we enhance the approach called Call Frequency-based Fault Localization, which analyzes the method's occurrence frequency in call-stack instances of failed tests. While it boosts SBFL's effectiveness, it overlooks the test scope. We propose that identifying unit and unit-like tests, followed by adjusting the frequency of the method by test type, can further enhance the fault localization ability of FL techniques. We empirically evaluated our method's effectiveness with the Defects4J benchmark. We found that utilizing weights in Call Frequency-based Fault Localization often ranks faulty methods higher, increasing the number of items in the top-10 positions.

Read the paper · More papers on PaperTik