arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1611.02516cs.SE
收藏

定制的突变体更适合bug

Tailored Mutants Fit Bugs Better

Miltiadis Allamanis, Earl T. Barr, René Just, Charles Sutton

摘要:

突变分析测量测试套件的充分性,测试套件检测种子故障的程度:如果检测到更多的突变,则一个测试套件比另一个测试套件更好。突变分析的有效性依赖于突变体与真实故障耦合的假设,即突变体检测与真实故障检测密切相关。验证这一点的工作也表明,很大一部分缺陷仍然无法触及。我们引入量身定制的突变算子来达到和捕获这些缺陷。定制的变异操作符是从现有的代码库及其历史构建的,并应用于现有的代码库及其历史。例如,他们可以识别和重放特定于项目的错误。作为我们的出发点,我们为标识符定义了定制的变异操作符,变异分析在很大程度上忽略了这些操作符,因为有太多的方法可以对它们进行变异。在Defects 4J数据集上进行评估,与传统的突变算子相比,我们的新突变算子创建的突变体与14%以上的错误相耦合。然而,这些新的突变算子使突变体的数量增加了四倍。为了解决这个问题,我们提出了一种新的方法,突变选择集中在应用突变算子的位置和突变代码的不自然性。结果表明,位置选择算法产生的突变更紧密地耦合到真正的故障,对于一个给定的预算的突变算子的应用程序。总之,本文定义并探索了定制的突变算子,从两个方面推进了突变测试的发展水平:1)它建议突变标识符和文字的突变算子,将突变分析扩展到一类新的故障; 2)它表明,选择应用突变算子的位置可以减少生成的突变体的数量,而不会影响突变体和实际突变体的耦合。断层

英文摘要:

Mutation analysis measures test suite adequacy, the degree to which a test suite detects seeded faults: one test suite is better than another if it detects more mutants. Mutation analysis effectiveness rests on the assumption that mutants are coupled with real faults i.e. mutant detection is strongly correlated with real fault detection. The work that validated this also showed that a large portion of defects remain out of reach. We introduce tailored mutation operators to reach and capture these defects. Tailored mutation operators are built from and apply to an existing codebase and its history. They can, for instance, identify and replay errors specific to the project for which they are tailored. As our point of departure, we define tailored mutation operators for identifiers, which mutation analysis has largely ignored, because there are too many ways to mutate them. Evaluated on the Defects4J dataset, our new mutation operators creates mutants coupled to 14% more faults, compared to traditional mutation operators. These new mutation operators, however, quadruple the number of mutants. To combat this problem, we propose a new approach to mutant selection focusing on the location at which to apply mutation operators and the unnaturalness of the mutated code. The results demonstrate that the location selection heuristics produce mutants more closely coupled to real faults for a given budget of mutation operator applications. In summary, this paper defines and explores tailored mutation operators, advancing the state of the art in mutation testing in two ways: 1) it suggests mutation operators that mutate identifiers and literals, extending mutation analysis to a new class of faults and 2) it demonstrates that selecting the location where a mutation operator is applied decreases the number of generated mutants without affecting the coupling of mutants and real faults.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑