A family of code coverage-based heuristics for effective fault localization

被引:147
作者
Wong, W. Eric [1 ]
Debroy, Vidroha [1 ]
Choi, Byoungju [2 ]
机构
[1] Univ Texas Dallas, Dept Comp Sci, Dallas, TX 75083 USA
[2] Ewha Womans Univ, Dept Comp Sci & Engn, Seoul, South Korea
关键词
Fault localization; Program debugging; Code coverage; Heuristics; Suspiciousness of code; Successful tests; Failed tests; SLICES;
D O I
10.1016/j.jss.2009.09.037
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Locating faults in a program can be very time-consuming and arduous, and therefore, there is an increased demand for automated techniques that can assist in the fault localization process. In this paper a code coverage-based method with a family of heuristics is proposed in order to prioritize suspicious code according to its likelihood of containing program bugs. Highly suspicious code (i.e., code that is more likely to contain a bug) should be examined before code that is relatively less suspicious; and in this manner programmers can identify and repair faulty code more efficiently and effectively. We also address two important issues: first, how can each additional failed test case aid in locating program faults; and second, how can each additional successful test case help in locating program faults. We propose that with respect to a piece of code, the contribution of the first failed test case that executes it in computing its likelihood of containing a bug is larger than or equal to that of the second failed test case that executes it, which in turn is larger than or equal to that of the third failed test case that executes it, and so on. This principle is also applied to the contribution provided by successful test cases that execute the piece of code. A tool, chi Debug, was implemented to automate the computation of the suspiciousness of the code and the subsequent prioritization of suspicious code for locating program faults. To validate our method case studies were performed on six sets of programs: Siemens suite, Unix suite, space, grep, gzip, and make. Data collected from the studies are supportive of the above claim and also suggest Heuristics III(a), (b) and (c) of our method can effectively reduce the effort spent on fault localization. (C) 2009 Elsevier Inc. All rights reserved.
引用
收藏
页码:188 / 208
页数:21
相关论文
共 36 条
[1]   On the accuracy of spectrum-based fault localization [J].
Abreu, Rui ;
Zoeteweij, Peter ;
van Gemund, Arjan J. C. .
TAIC PART 2007 - TESTING: ACADEMIC AND INDUSTRIAL CONFERENCE - PRACTICE AND RESEARCH TECHNIQUES, PROCEEDINGS: CO-LOCATED WITH MUTATION 2007, 2007, :89-+
[2]   DEBUGGING WITH DYNAMIC SLICING AND BACKTRACKING [J].
AGRAWAL, H ;
DEMILLO, RA ;
SPAFFORD, EH .
SOFTWARE-PRACTICE & EXPERIENCE, 1993, 23 (06) :589-616
[3]  
Agrawal H, 1995, SIXTH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, PROCEEDINGS, P143, DOI 10.1109/ISSRE.1995.497652
[4]   Mining system tests to aid software maintenance [J].
Agrawal, H ;
Albert, JL ;
Horgan, JR ;
Li, JJ ;
London, S ;
Wong, WE ;
Ghosh, S ;
Wilde, N .
COMPUTER, 1998, 31 (07) :64-+
[5]  
Agrawal H., 1990, P ACM SIGPLAN 90 C P
[6]   Is mutation an appropriate tool for testing experiments? [J].
Andrews, JH ;
Briand, LC ;
Labiche, Y .
ICSE 05: 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, PROCEEDINGS, 2005, :402-411
[7]  
[Anonymous], 1998, XSUDS US MAN
[8]  
[Anonymous], 2006, P 23 INT C MACH LEAR
[9]  
[Anonymous], 2007, The Siemens Suite
[10]  
[Anonymous], 2006, P 28 INT C SOFTW ENG