一句话:MuRS 利用标识符模板对变异体分组,并基于历史开发者反馈自动排序与抑制无用变异体。
该论文关注基于 diff 的变异测试在代码审查中的应用。此类变异测试只变异变更行,能独立于代码库规模扩展,并产生与开发者当前任务直接相关的测试目标。Google 的变异测试服务已将其集成到代码审查流程,并持续收集开发者对变异体的反馈。现有服务依赖人工编写的抑制规则来过滤持续收到负面反馈的无用变异体,但维护这些规则成本高。本文提出并评估 MuRS:它按被测源码中的模式对变异体分组,并利用同一组内历史开发者反馈来排序和抑制未来变异体。评估采用 A/B 测试,将 MuRS 与现有变异测试服务比较。结果显示,尽管基线已使用人工抑制规则,MuRS 仍将负面反馈率从 12.41% 显著降至 11.45%,并能恢复基线中的既有抑制规则;同时发现语句删除变异体组同时获得最多正面和负面反馈,表明这些组仍需额外上下文来区分有用与无用变异体。总体而言,MuRS 能从开发者反馈中自动学习更细粒度的抑制规则。
Diff-based mutation testing is a mutation testing approach that only mutates lines affected by a code change under review. This approach scales independently of the code-base size and introduces test goals (mutants) that are directly relevant to an engineer’s goal such as fixing a bug, adding a new feature, or refactoring existing functionality. 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 uses a number of manually-written rules that suppress not-useful mutants—mutants that have consistently received negative developer feedback. However, while effective, manually implementing suppression rules requires significant engineering time. 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-written 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 is able to recover existing suppression rules and automatically learn additional, finer-grained suppression rules from developer feedback.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{ChenSVPIJ23,
title = {MuRS: Mutant Ranking and Suppression using Identifier Templates},
author = {Zimin Chen and Małgorzata Salawa and Manushree Vijayvergiya and Goran Petrović and Marko Ivanković and René Just},
booktitle = {FSE},
year = {2023},
doi = {10.1145/3611643.3613901}
}