In order to improve the efficiency of software fault localization, supervised learning methods are widely used in automatic software fault localization. But these methods mostly ignore a very important fact:in order to train a good performance of the classifier through supervised learning method, there must be a large number of labeled samples. While in the actual project, to obtain a large number of labeled samples is quite difficueven if it can be done, the cost is very high. In order to solve this problem, we propose a semi supervised learning algorithm for soft⁃ware fault location. We adopt a high⁃creditability and collaborative style of semi supervised learning algorithm named Co⁃Trade, which uses the dynamic attributes between the programs′executable statements and test case exe⁃cution as well as some effective static attributes of traditional software fault localization to achieve the purpose of co⁃operative training. Finally, selecting the Siemens Suite as the test data, we prove the validity of Co⁃Trade algorithm in software fault localization by comparing it with the traditional supervised learning methods.%故障定位是软件工程中最为耗时和昂贵的活动之一,为降低软件故障定位的成本及提高故障定位的效率,机器学习方法被广泛应用于自动化软件故障定位中。传统的监督学习方法需要获取大量标记样本,这在实际项目中相当困难,且费用高昂。针对这一问题,提出采用半监督学习方法进行软件故障定位的思想,故障定位基于语句级别,通过应用程序中可执行语句与测试用例执行之间动态属性、以及传统软件故障定位中较有效的若干静态属性实现协同训练目的,得到训练良好的分类器,然后用该分类器对程序其余语句进行分类,从而得到故障语句。文章最后在Siemens Suite数据集中对算法进行验证,通过与传统监督学习算法进行对比,证明半监督学习算法在软件故障定位中的有效性。
展开▼