计算机学报
計算機學報
계산궤학보
Chinese Journal of Computers
2015年
9期
1880-1892
,共13页
错误定位%定位模型%分散化%覆盖度%软件测试
錯誤定位%定位模型%分散化%覆蓋度%軟件測試
착오정위%정위모형%분산화%복개도%연건측시
fault localization%localization model%disperse%coverage%software test
错误定位技术是当前的研究热点.在各种错误定位方法中,基于最接近执行比较的方法(NN 方法)[1]从成功测试执行中,选择与已发现失败执行最接近的一个,和失败执行进行比较,从而定位错误.NN 方法是一种非常重要的方法,然而,实验中却发现,对于一些程序,选择最接近的成功执行与失败执行进行比较,并不能取得好的错误定位效果.为探明原因,文中首先对基于成功-失败执行比较的错误定位模型进行了研究,指出了 NN 方法存在上述问题的根本原因是在选择成功执行时只考虑了其与失败执行的差异数量,而忽略了差异与错误的距离这一因素.据此,提出了一种基于差异分散化的错误定位方法,其主要思想是在适当控制差异数量的同时,选择与失败执行差异最分散的成功执行,来进行错误定位.利用分散化使得部分差异能够接近错误.实验表明,该方法错误定位效果优于 NN 方法,性能更佳.
錯誤定位技術是噹前的研究熱點.在各種錯誤定位方法中,基于最接近執行比較的方法(NN 方法)[1]從成功測試執行中,選擇與已髮現失敗執行最接近的一箇,和失敗執行進行比較,從而定位錯誤.NN 方法是一種非常重要的方法,然而,實驗中卻髮現,對于一些程序,選擇最接近的成功執行與失敗執行進行比較,併不能取得好的錯誤定位效果.為探明原因,文中首先對基于成功-失敗執行比較的錯誤定位模型進行瞭研究,指齣瞭 NN 方法存在上述問題的根本原因是在選擇成功執行時隻攷慮瞭其與失敗執行的差異數量,而忽略瞭差異與錯誤的距離這一因素.據此,提齣瞭一種基于差異分散化的錯誤定位方法,其主要思想是在適噹控製差異數量的同時,選擇與失敗執行差異最分散的成功執行,來進行錯誤定位.利用分散化使得部分差異能夠接近錯誤.實驗錶明,該方法錯誤定位效果優于 NN 方法,性能更佳.
착오정위기술시당전적연구열점.재각충착오정위방법중,기우최접근집행비교적방법(NN 방법)[1]종성공측시집행중,선택여이발현실패집행최접근적일개,화실패집행진행비교,종이정위착오.NN 방법시일충비상중요적방법,연이,실험중각발현,대우일사정서,선택최접근적성공집행여실패집행진행비교,병불능취득호적착오정위효과.위탐명원인,문중수선대기우성공-실패집행비교적착오정위모형진행료연구,지출료 NN 방법존재상술문제적근본원인시재선택성공집행시지고필료기여실패집행적차이수량,이홀략료차이여착오적거리저일인소.거차,제출료일충기우차이분산화적착오정위방법,기주요사상시재괄당공제차이수량적동시,선택여실패집행차이최분산적성공집행,래진행착오정위.이용분산화사득부분차이능구접근착오.실험표명,해방법착오정위효과우우 NN 방법,성능경가.
Fault localization is a very active research area.In all fault localization methods,the Nearest Neighbor based (NN)method[1]selects a successful run that is closest to the failed run to compare and locate the bugs.NN method is very important and is widely used.However,we found that its fault localization effects sometimes significantly degrade even when a nearest successful run is selected.To get the reason,this paper firstly studies the basic model of the execution comparison based fault localization approaches.With the model,we found that a primary cause of NN method’s degradation is that it only considers the number of differences between successful runs and failed runs while ignores the distances from the difference points to the bugs. Based on the above finding,we presented a new fault localization method based on a difference dispersion technique.Its key idea is to choose successful runs with dispersed difference points to the failed run to compare and locate the bugs.The dispersion of differences can make some difference points close to the bug and therefore reduce bug localization efforts.We conducted an experimental study on several widely used benchmark programs.The results indicate that our method is both effective and efficient.