在軟體的發展與維護方面,錯誤定位通常是複雜而耗費時間的過程.為了有效率的找出錯誤的所在,從以前到現在已經有許多的方法被提出來.Similarity-aware fault localization (SAFL)是其中一種以測試為基礎的錯誤定位方法,它利用測試時所得到的資料去計算每一個敘述式可疑的機率.而dicing是另一個在本篇中被拿來比較的方法.在本篇論文中,相對於傳統SAFL著重在所有敘述式的分析,我們將焦點放在判斷式以及它們對於整個測試過程中資料數值的影響來對傳統方法做修正.在我們所建議的方法中,運用了模糊集合論、矩陣以及機率的運算以分析測試資料,並簡化了測試的程式碼以增進執行除錯的效能.在經過運算後,可以得到各敘述式代表其可疑程度的數值,藉著此數值來幫助測試人員找出真正的錯誤所在. 在說明所建議的方法之後,我們將其與其它二個同樣以測試為基礎的除錯方法做比較.實驗中包含了數個程式,在不同的條件下如行數、包含的錯誤總數等執行測試.結果則分別以可疑的程式碼比例、平均所需檢查的敘述式行數、以及執行時間三種標準來表示.實驗結果顯示出,我們所建議的方法能有效的降低在發現真正的錯誤之前,所需要檢查的程式碼數量.
In software development and maintenance, locating faults is generally a complex and time-consuming process. In order to effectively identify the locations of program faults, several approaches have been proposed. Similarity-aware fault localization (SAFL) is a testing based fault localization method that utilizes the testing information to calculate the suspicion probability of each statement. And dicing is another method that we use to compete. In this thesis, our approach method focuses on predicates and their influence instead of statements in traditional SAFL. It uses fuzzy theory, matrix calculating, and some probability computing. Then it detects the importance of each predicate. Thus programs will have more test data for us to analyze the fault locations. Furthermore, programmers will gain important information about the program. They can use this information to maintain their program. In order to speed up the efficiency, we also simplified the program. Then we performed an experimental study for several programs, together with another two testing based fault localization (TBFL) approaches. The discussion of how different conditions such as line of code, suspicious code coverage, and execution time of these three methods are shown. Our experimental results show that the method helps in decreasing the number of codes which have more probability of suspicion than real bugs.