Skip to Main Content
Fault localization techniques help programmers find out the locations and the causes of the faults and accelerate the debugging process. The relation between the fault and the failure is usually complicated, making it hard to deduce how a fault causes the failure. Analysis of variance is broadly used in many correlative researches. In this paper, a Bayesian belief network (BBN) for fault reasoning was constructed based on the suspicious pattern, whose nodes consist of the suspicious pattern and the callers of the methods that constitute the suspicious pattern. The constructing algorithm of the BBN, the correlative probabilities, and the formula for the conditional probabilities of each arc of the BBN were defined. A reasoning algorithm based on the BBN was proposed, through which the faulty module can be found and the probability for each module containing the fault can be calculated. An evaluation method was proposed. Experiments were executed to evaluation this fault localization technique. The data demonstrated that this technique could achieve an average accuracy of 0.761 and an average recall of 0.737. This fault localization technique is very effective and has high practical value.