首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到18条相似文献,搜索用时 125 毫秒
1.
通过增大边际权重提高基于频谱的错误定位效率   总被引:1,自引:0,他引:1  
基于频谱的错误定位技术通常利用覆盖信息来求出程序中每条语句的可疑度,并将语句按照可疑度降序排序以寻找错误语句.文中对已有的基于频谱的错误定位算法进行改进,将失败测试用例的边际权重引入到可疑度计算的过程中,即针对某一特定语句,令失败测试用例的权重随着其对该语句覆盖次数的增加而增大.实验结果表明,相对于其它方法,文中提出的方法对错误定位效率有一定的促进作用,即只需检查更少的语句即可找到出错位置.  相似文献   

2.
龚沛  耿楚瑶  郭俊霞  赵瑞莲 《计算机科学》2016,43(2):199-203, 229
在软件调试过程中,如何快速、精确地定位程序中的错误代码是软件开发人员普遍关注的问题。基于变异的错误定位方法是一种通过分析被测程序与程序变异体之间的行为相似性来估计语句出错概率、进行错误定位的方法。该方法有较高的错误定位精确度,但由于需对大量程序变异体执行测试用例集,因此其变异执行开销较大。为此提出了一种动态变异执行策略,它通过搜集测试用例执行信息,动态地调整变异体及测试用例的执行顺序,以减少其变异执行开销。实验结果表明,在6个程序包的127个错误版本上,应用提出的动态变异执行策略可在保证错误定位精确度的前提下,减少23%~78%的变异执行开销,显著提高了基于变异的错误定位方法的效率。  相似文献   

3.
现有的测试用例约简方法不能有效提高错误定位精度,现有的软件错误定位方法不能充分分析元素间的依赖关系.针对以上问题,提出结合测试用例约简和联合依赖概率建模的软件错误自动定位方法,将测试用例约简与软件错误定位统一为一个整体.不同于一般的测试用例约简方法,所提出的测试用例约简方法在程序执行路径的基础上充分考虑了错误测试用例对错误定位的影响,能够为错误定位提供有效的测试用例,为快速、准确地定位软件错误奠定基础.定义了一种新的统计模型——联合依赖概率模型,充分分析了程序元素间的控制依赖、数据依赖以及语句执行状态,并提出基于联合依赖概率模型的错误自动定位方法.通过计算联合依赖关系的可疑度,对可疑节点进行排序,准确定位错误语句.实验结果表明:与SBI,SOBER,Tarantula,SF和RankCP方法相比,该算法可以更加有效地定位软件错误.  相似文献   

4.
基于谱的错误定位(SBFL)方法能帮助程序员减小软件调试的困难。作为一种轻量方法,SBFL只需收集测试用例的覆盖信息和测试结果,计算程序每条语句的运行特征。众多SBFL方法,将四个运行特征组合成不同的可疑度计算公式。然而,这些公式受固定参数的影响,无法适应不同的程序集。因此,提出一种机器学习方法,能自动确定特定程序集的可疑度计算公式。首先,收集已标注错误语句的程序旧版本;再将错误语句与正确语句的运行特征两两相减,构造为训练集的一个样本;最后基于Weka的分类算法,学习到线性函数,作为该程序的错误定位模型。在Siemens程序包、space和gzip三个基准数据集上,使用Logistic、SGD、SMO和LibLinear学习到的模型,性能都要优于SBFL方法。  相似文献   

5.
王曙燕 《计算机应用研究》2021,38(5):1487-1490,1497
针对基于程序谱错误定位方法完全依赖于测试用例的语句覆盖信息导致错误定位效率低下的问题,提出了一种基于变异测试技术的程序谱错误定位方法。在原有语句怀疑度计算方法的基础上,增加了程序变异后执行结果与原程序执行结果不同的测试用例变化情况的分析。此外,为解决程序变异后产生的变异体数量巨大而导致执行代价过大的问题,提出了根据变异位置约简变异体的策略。实验结果表明,与几种基于程序谱的程序错误定位方法相比,该方法的错误定位代价最低,能有效提高错误定位的效率。  相似文献   

6.
错误定位就是寻找程序错误的位置.现有的错误定位方法大多利用测试用例的覆盖信息,以标识一组导致程序失效的可疑语句,却忽视了这些语句相互作用导致失效的上下文.因此,提出一种增强上下文的错误定位方法Context-FL,以构建上下文的方式来优化错误定位性能.Context-FL利用动态切片技术构建数据与控制相关性的错误传播上下文,显示了导致失效的语句之间传播依赖关系;然后,基于可疑值度量来区分上下文片段中不同语句的可疑度;最后,Context-FL以标记可疑值的上下文作为定位结果.实验结果表明,Context-FL优于8种典型错误定位方法.  相似文献   

7.
在整个软件开发周期中,软件测试占软件开发和维护成本的一半以上,而软件错误定位是一个最困难,最耗时的任务。错误定位技术以定位软件中的错误代码为目的,通过在待测程序上运行合适的测试用例的基础上,分析并定位错误语句。由于错误定位的精度高度依赖于选择的测试用例,测试用例的数量和质量是决定错误定位的成本和有效性的关键因素,因此,面向错误定位选择有效的测试用例,不仅有助于分析软件错误产生的原因,还能极大地提高软件错误定位的效率。首先对面向错误定位的测试用例约简方法进行了分类,并对各类测试用例约简方法进行了分析和总结,进而指出了其中存在的问题和未来的研究方向。  相似文献   

8.
故障定位是软件调试过程中一项耗时耗力的工作,自动化查错的应用对于提高软件调试效率具有重要的现实意义。近年来,基于程序谱的故障定位方法得到了研究人员的大量关注。针对单错误现象,提出了基于改良程序谱的软件故障定位新方法,该方法基于“在单错误情况下,若测试用例运行错误,则该测试用例运行必定覆盖了故障语句”这一论断,将所有的故障测试用例对程序语句的覆盖情况做交运算,从而得到故障基,再利用故障基定位故障。最后,以西门子测试程序集为测试数据,对比了不同方法对故障定位的效果和效率的影响,其结果表明所提出的方法可以有效地提高故障定位的效果和效率。  相似文献   

9.
错误定位是软件调试中最重要且最耗时的部分,错误定位中的任何改进都可以大大降低软件成本,而其中秩函数的选择问题则尤为关键。结合基因表达式编程技术以及基于频谱的错误定位算法,找到适应程序的高效秩函数,提出了一种新的错误定位方法。从程序测试用例的覆盖信息中提取出四种类型的子集信息;通过基因表达式编程训练出适应程序的最优秩函数;利用秩函数计算出每条语句的可疑度值,并按照可疑度值由高到低的顺序逐条检查程序的可疑语句进行错误定位。通过实验,将训练出的秩函数与已经提出的秩函数(如Tarantula,Ochiai等)进行比较分析,结果表明,基于基因表达式编程的错误定位方法具有更精确的错误定位效果和更显著的定位效率。  相似文献   

10.
张卓  雷晏  毛晓光  常曦  薛建新  熊庆宇 《软件学报》2020,31(11):3448-3460
错误定位方法大多通过分析语句覆盖信息来标识出导致程序失效的可疑语句.其中,语句覆盖信息通常以语句执行或语句未执行的二进制状态信息来表示.然而,该二进制状态信息仅表明该语句是否被执行的信息,无法体现该语句在具体执行中的重要程度,可能会降低错误定位的有效性.为了解决这个问题,提出了基于词频-逆文件频率的错误定位方法.该方法采用词频-逆文件频率技术识别出单个测试用例中语句的影响程度高低,从而构建出具有语句重要程度识别度的信息模型,并基于该模型来计算语句的可疑值.实验结果表明,该方法大幅提升了错误定位的效能.  相似文献   

11.
Debugging is crucial for producing reliable software. One of the effective bug localization techniques is spectral‐based fault localization (SBFL). It helps to locate a buggy statement by applying an evaluation metric to program spectra and ranking program components on the basis of the score it computes. SBFL is an example of a dynamic analysis – an analysis of computer program that is performed by executing it with sufficient number of test cases. Static analysis, on the other hand, is performed in a non‐runtime environment. We introduce a weighting technique by combining these two kinds of program analysis. Static analysis is performed to categorize program statements into different classes and giving them weights based on the likelihood of being buggy statement. Statements are finally ranked on the basis of the weights computed by statements' categorization (static analysis) and scores computed by SBFL metrics (dynamic analysis). We evaluate the performance of our technique on Siemens test suite and Flex (having seeded bugs seeded by expert developers), Sed (having mixture of real and seeded bugs), and Space (having real bugs). In our evaluation, proposed weighting technique improves the performance of a wide variety of fault localization metrics up to 20% on single bug datasets and up to 42% on multi‐bug datasets. Copyright © 2017 John Wiley & Sons, Ltd.  相似文献   

12.
何海江 《计算机应用研究》2021,38(11):3393-3397
基于程序谱的软件错误定位(spectrum-based fault localization,SBFL)技术收集测试用例结果和语句覆盖信息,用以计算每条语句的可疑度值.认知复杂度是软件复杂性度量工具,其值高的代码较易出错.为提升错误定位性能,提出一种语句级认知复杂度和SBFL相组合的方法对语句排序.当多条语句可疑度值相等时,新方法优先检查认知复杂度高的语句.测试数据集有925个错误版本,包含Java、C和C++项目.实验结果证实,加入认知复杂度后,传统的SBFL技术能减少待排查语句.  相似文献   

13.
软件错误定位与错误理解是软件调试过程中的重要步骤,然而调试人员利用基于覆盖分析的软件错误定位获取的可疑度,从高到低静态分析每条程序语句的检查方式,与实际软件调试过程并不相符。为了能够筛选更有助于理解错误根源的测试执行,尤其是致使程序失效的失效执行,帮助调试人员进行动态差异化分析,针对失效执行提出基于高可疑度覆盖率、揭示错误潜力和覆盖语句可疑度离散特征的3种优先级策略,针对成功执行提出加权余弦相似度匹配策略。通过将3种失效执行优先级策略与随机选择在常用错误定位技术中进行实验对比,验证了基于覆盖语句可疑度离散特征的失效执行筛选策略能够对筛选前后的错误理解工作量变化产生更强的积极影响和更弱的消极影响,并能够在相同工作量下理解更多的错误,进而更有助于将错误定位结果应用于错误根源的理解。  相似文献   

14.
姜淑娟  张旭  王荣存  黄颖  张艳梅  薛猛 《软件学报》2021,32(7):2166-2182
软件错误定位是一项耗时又费力的工作,因此如何提高软件错误定位的自动化程度一直以来都是软件工程领域研究的热点.现有的基于频谱的错误定位方法很少利用程序的上下文信息,而程序的上下文信息对错误定位至关重要.针对此问题,本文提出了一种基于路径分析和信息熵的错误定位方法FLPI.该方法在基于频谱信息技术的基础上,通过对所有执行路径中的数据依赖关系进行分析来引入执行上下文信息,同时利用信息熵理论将测试事件信息引入到可疑语句的怀疑度计算公式中,以提高错误定位的精度和效率.为了评价该方法的有效性,基于一组基准程序和开源程序进行实验验证.实验结果表明,本文所提方法FLPI能够有效地提高错误定位的精度和效率.  相似文献   

15.
在程序调试过程中,基于程序谱的软件错误定位(SBFL)技术能提供有效的帮助。为改善SBFL的性能,提出一种组合程序谱、代码行静态属性的软件错误定位排序学习方法,由线性排序支持向量机学习最优错误定位模型。代码行静态属性包括局部变量、类属性、逻辑运算符和方法调用等程序实体的个数。在使用C、C++和Java语言开发的22个实际故障项目上,采用跨工程的形式训练错误定位模型。实验结果表明,新方法比最优SBFL减少了37.1%的最坏策略EXAM和22.6%的平均策略EXAM。还比较了程序语句的3类轻量级特征:结构化类别、变量谱和静态属性。新方法的时间复杂度低,能实时地推荐可能出现故障的语句序列。  相似文献   

16.
ContextBecause of its simplicity and effectiveness, Spectrum-Based Fault Localization (SBFL) has been one of the popular approaches towards fault localization. It utilizes the execution result of failure or pass, and the corresponding coverage information (such as program slice) to estimate the risk of being faulty for each program entity (such as statement). However, all existing SBFL techniques assume the existence of a test oracle to determine the execution result of a test case. But, it is common that test oracles do not exist, and hence the applicability of SBFL has been severely restricted.ObjectiveWe aim at developing a framework that can extend the application of SBFL to the common situations where test oracles do not exist.MethodOur approach uses a new concept of metamorphic slice resulting from the integration of metamorphic testing and program slicing. In SBFL, instead of using the program slice and the result of failure or pass for an individual test case, a metamorphic slice and the result of violation or non-violation of a metamorphic relation are used. Since we need not know the execution result for an individual test case, the existence of a test oracle is no longer a requirement to apply SBFL.ResultsAn experimental study involving nine programs and three risk evaluation formulas was conducted. The results show that our proposed solution delivers a performance comparable to the performance observed by existing SBFL techniques for the situations where test oracles exist.ConclusionWith respect to the problem that SBFL is only applicable to programs with test oracles, we propose an innovative solution. Our solution is not only intuitively appealing and conceptually feasible, but also practically effective. Consequently, test oracles are no longer mandatory for SBFL, and hence the applicability of SBFL is significantly extended.  相似文献   

17.
Most of the existing fault localization approaches use execution coverage of test cases to isolate the suspicious codes that likely contain faults. Program slicing can extract the dependencies of program entities with respect to a specific criterion. Therefore this technique is expected to have a beneficial effect on fault localization. In this paper, we propose a novel approach using a hybrid spectrum of full slices and execution slices to improve the effectiveness of fault localization. In particular, our approach firstly computes full slices of failed test cases and execution slices of passed test cases respectively. Secondly it constructs the hybrid spectrum by intersecting full slices and execution slices. Finally it computes the suspiciousness of each statement in the hybrid slice spectrum and generates a fault location report with descending suspiciousness of each statement. We also implement our proposed approach in our prototype tool HSFal by Java programming language. To verify the effectiveness of our approach, we performed an empirical study by the prototype on several widely used open source programs. Our approach is compared with eight representative coverage-based and slice-based fault localization approaches. Final experimental results show that our proposed approach is more effective in fault localization than other compared approaches, and can reduce almost 2.98–31.79% of the average cost of examined code significantly.  相似文献   

18.
Spectrum-based fault localization is amongst the most effective techniques for automatic fault localization. However, abstractions of program execution traces, one of the required inputs for this technique, require instrumentation of the software under test at a statement level of granularity in order to compute a list of potential faulty statements. This introduces a considerable overhead in the fault localization process, which can even become prohibitive in, e.g., resource constrained environments. To counter this problem, we propose a new approach, coined dynamic code coverage (DCC), aimed at reducing this instrumentation overhead. This technique, by means of using coarser instrumentation, starts by analyzing coverage traces for large components of the system under test. It then progressively increases the instrumentation detail for faulty components, until the statement level of detail is reached. To assess the validity of our proposed approach, an empirical evaluation was performed, injecting faults in six real-world software projects. The empirical evaluation demonstrates that the dynamic code coverage approach reduces the execution overhead that exists in spectrum-based fault localization, and even presents a more concise potential fault ranking to the user. We have observed execution time reductions of 27% on average and diagnostic report size reductions of 77% on average.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号