Visual Spectrum-Based Fault Localization for Python Programs Based on the Differentiation of Execution Slices

Shehroz Khan, Gaadha Sudheerbabu, Bianca Elena Staicu, Tanwir Ahmad, Dragoş Truşcan · 2025

We present an automated fault localization technique that can assist developers to localize effectively faults in Python programs. The proposed method uses spectrum-based fault localization techniques, program slicing, and graph-based visualization to formulate an efficient method for reducing the effort needed in fault localization. The approach takes the source code of a program, a set of passed and failed tests and collects the program spectra information by executing the tests. A tool, FaultLocalizer, facilitates the generation of a call graph for inter-procedural dependency analysis and annotated control flow graphs for different modules with spectra information and suspiciousness scores. The focus of the approach is on the visual analysis of the source code, and it is intended to complement existing fault localization approaches. The effectiveness of the proposed approach is evaluated on a set of buggy Python programs. The results show that the approach reduces debugging efforts and can be applied to programs with conditional branching.

Read the paper · More papers on PaperTik