2018 Volume 35 Issue 4 Pages 122-128
This paper presents a feasibility study to predict software bugs in statement level. The proposed method uses a window to inspect a given source file containing a bug. By moving the window from the top to the end of a source file, a set of buggy windows and non-buggy windows are derived. Then, we construct a spam filter-based bug prediction model, whose input is a set of tokens in a window and output is the probability of containing a bug in the window. Finally, we integrate bug prediction results on these windows to compute the probability of containing a bug in each statement. We conducted a feasibility study using 593 source files each containing one bug, and found that, by using the size=3 window, we could identify 67.1% of bugs in top 10 buggy statements of each source file prioritized by our bug prediction, which suggests that the bug pinpointing is feasible.