Abstract:Fault localization is a process to determine the root causes of abnormal behavior of a faulty program. Most existing fault localization approaches usually utilize coverage information of test cases to identify a set of isolated statements responsible for a failure, but do not show how these statements act on each other to cause the failure. Thus, this study proposes Context-FL:An approach enhancing contexts for these existing localization approaches by constructing contexts for fault localization optimization. Specifically, Context-FL uses dynamic slicing technology to construct a context showing how data/control dependence propagates to cause the faulty output. Then, it adopts suspiciousness evaluation to distinguish the elements of the context in terms of the suspiciousness being faulty. Finally, Context-FL outputs the context with suspiciousness as the localization result. The empirical results show that the proposed approach significantly outperforms 8 state-of-the-art fault localization techniques.