MuRS:使用标识符模板的变异体排序与抑制
MuRS: Mutant Ranking and Suppression using Identifier Templates
AI总结:
针对手动制定变异测试抑制规则成本高的问题,提出基于源代码模式分组、结合历史开发者反馈自动排序抑制变异体的MuRS方法,A/B测试显示其负面反馈率显著低于手动规则基线,可降低服务维护成本。
摘要:
基于差异的变异测试是一种仅对受评审代码变更影响的代码行进行变异的变异测试方法。谷歌的变异测试服务将基于差异的变异测试集成到代码评审流程中,并持续收集开发者对代码评审期间出现的变异体的反馈。为提升开发者体验,该变异测试服务实施了若干抑制规则,针对的是无用变异体——即持续收到开发者负面反馈的变异体。然而,这些规则虽然有效,但手动实施抑制规则需要大量工程时间。一套用于变异体排序和抑制的自动化系统将有助于变异测试服务的维护。本文提出并评估了MuRS(基于标识符模板的变异体排序与抑制),这是一种自动化方法,它根据被测源代码中的模式对变异体进行分组,并基于历史上开发者对同组变异体的反馈,利用这些模式对未来的变异体进行排序和抑制。为评估MuRS,我们开展了一项A/B测试研究,将MuRS与现有变异测试服务进行对比。尽管基线系统(采用手动开发的抑制规则)表现强劲,但结果显示,MuRS的负面反馈率为11.45%,基线为12.41%,在统计学上显著更低。结果还表明,MuRS能够复现基线中已实施的现有抑制规则。最后,结果显示语句删除类变异体组收到的开发者正面和负面反馈均最多,这表明需要额外的上下文信息来区分这些组中有用和无用的变异体。总体而言,MuRS通过自动学习抑制规则,有望大幅降低构建有效变异测试服务的开发和维护成本。
英文摘要:
Diff-based mutation testing is a mutation testing approach that only mutates lines affected by a code change under review. Google's mutation testing service integrates diff-based mutation testing into the code review process and continuously gathers developer feedback on mutants surfaced during code review. To enhance the developer experience, the mutation testing service implements a number of suppression rules, which target not-useful mutants-that is, mutants that have consistently received negative developer feedback. However, while effective, manually implementing suppression rules require significant engineering time. An automatic system to rank and suppress mutants would facilitate the maintenance of the mutation testing service. This paper proposes and evaluates MuRS, an automated approach that groups mutants by patterns in the source code under test and uses these patterns to rank and suppress future mutants based on historical developer feedback on mutants in the same group. To evaluate MuRS, we conducted an A/B testing study, comparing MuRS to the existing mutation testing service. Despite the strong baseline, which uses manually developed suppression rules, the results show a statistically significantly lower negative feedback ratio of 11.45% for MuRS versus 12.41% for the baseline. The results also show that MuRS is able to recover existing suppression rules implemented in the baseline. Finally, the results show that statement-deletion mutant groups received both the most positive and negative developer feedback, suggesting a need for additional context that can distinguish between useful and not-useful mutants in these groups. Overall, MuRS has the potential to substantially reduce the development and maintenance cost for an effective mutation testing service by automatically learning suppression rules.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。