Abstract:
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. At present, analysis of variance is broadly used in many recent correlative researches. In this paper, a Bayesian belief network (BBN) for fault reasoning is 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 are defined. A reasoning algorithm based on the BBN is proposed, through which the faulty module can be found and the probability for each module containing the fault can be calculated. An evaluation method is proposed. Experiments are executed to evaluate this fault localization technique. The data demonstrate that 0.761 in accuracy and 0.737 in recall on average are achieved by this technique. It is very effective in fault localization and has high practical value.