一句话:对真实 Java 程序中的等价变异体进行实证研究,并提出高效抑制技术 EMS,性能远超 TCE。
等价变异体长期阻碍变异测试的广泛应用。本文对真实 Java 程序中等价变异体的类型与流行度进行实证研究,人工标注来自 7 个开源 Java 项目的 1,992 个变异体,识别出 215 个等价变异体,并按等价原因与检测难度分组。分析发现中位比例为 2.97%,且许多由常见编程模式导致,检测可近似为 AST 结构模式匹配。基于此,作者提出 Equivalent Mutant Suppression (EMS),包含 10 个高效且有针对性的分析。在 19 个开源 Java 项目上,EMS 在 325 秒内检测 8,776 个等价变异体,而当前最优的 TCE 检测 2,124 个需 2,938 小时;还分析了各工具报告的 9,047 个等价变异体。
The presence of equivalent mutants has long been considered a major obstacle to the widespread adoption of mutation analysis and mutation testing. This paper presents a study on the types and prevalence of equivalent mutants in real-world Java programs. We conducted a ground-truth analysis of 1,992 mutants, sampled from 7 open source Java projects. Our analysis identified 215 equivalent mutants, which we grouped based on two criteria that describe why the mutants are equivalent and how challenging their detection is. From this analysis, we observed that (1) the median equivalent mutant rate across the 7 projects is 2.97%; (2) many equivalent mutants are caused by common programming patterns and their detection is not much more complex than structural pattern matching over an abstract syntax tree. Based on the findings of our ground-truth analysis, we developed Equivalent Mutant Suppression (EMS), a technique that comprises 10 efficient and targeted analyses. We evaluated EMS on 19 open- source Java projects, comparing the effectiveness and efficiency of EMS to two variants of Trivial Compiler Equivalence (TCE), the current state of the art in equivalent mutant detection. Additionally, we analyzed all 9,047 equivalent mutants reported by any tool to better understand the types and frequencies of equivalent mutants found. Overall, EMS detects 8,776 equivalent mutants within 325 seconds; TCE detects 2,124 equivalent mutants in 2,938 hours.
@inproceedings{paperbot8543,
title = {Equivalent Mutants in the Wild: Identifying and Efficiently Suppressing Equivalent Mutants for Java Programs},
author = {Benjamin Kushigian and Samuel J. Kaufman and Ryan Featherman and Hannah Potter and Ardi Madadi and René Just},
booktitle = {ISSTA},
year = {2024},
doi = {10.1145/3650212.3680310}
}