  Context: Fault localization (FL) is the key activity while debugging a
program. Any improvement to this activity leads to significant improvement in
total software development cost. There is an internal linkage between the
program spectrum and test execution result. Conditional probability in
statistics captures the probability of occurring one event in relationship to
one or more other events. Objectives: The aim of this paper is to use the
conception of conditional probability to design an effective fault localization
technique. Methods: In the paper, we present a fault localization technique
that derives the association between statement coverage information and test
case execution result using condition probability statistics. This association
with the failed test case result shows the fault containing the probability of
that specific statement. Subsequently, we use a grouping method to refine the
obtained statement ranking sequence for better fault localization. Results: We
evaluated the effectiveness of proposed method over eleven open-source data
sets. Our obtained results show that on average, the proposed CGFL method is
24.56% more effective than other contemporary fault localization methods such
as D*, Tarantula, Ochiai, Crosstab, BPNN, RBFNN, DNN, and CNN. Conclusion: We
devised an effective fault localization technique by combining the conditional
probabilistic method with failed test case execution-based approach. Our
experimental evaluation shows our proposed method outperforms the existing
fault localization techniques.
