Though mutation testing has been widely studied for more than thirty years, the prevalence and properties of equivalent mutants remain largely unknown. We report on the causes and prevalence of equivalent mutants and their relationship to stubborn mutants (those that remain undetected by a high quality test suite, yet are non-equivalent). Our results, based on manual analysis of 1,194 mutants from 18 programs, reveal a highly uneven distribution of equivalence and stubbornness. For example, the ABS class and half UOI class generate many equivalent and almost no stubborn mutants, while the LCR class generates many stubborn and few equivalent mutants. We conclude that previous test effectiveness studies based on fault seeding could be skewed, while developers of mutation testing tools should prioritise those operators that we found generate disproportionately many stubborn (and few equivalent) mutants.
A Summary of the Human-Evaluated Decision Procedure for Mutant Equivalence
Case 1: Mutant cannot be reached by any test input| Subjects | C1.1 | C1.2 | C2.1 | C2.2 | C2.3 | C3.1 | C3.2 |
|---|---|---|---|---|---|---|---|
| Min | 0 | 0 | 0 | 1 | 0 | 8 | 0 |
| Bubble Sort | 0 | 0 | 0 | 0 | 0 | 3 | 6 |
| Profit | 0 | 0 | 0 | 17 | 5 | 24 | 0 |
| Mid | 0 | 0 | 0 | 0 | 5 | 14 | 0 |
| Prime_num | 0 | 0 | 0 | 5 | 0 | 4 | 0 |
| Triangle | 0 | 0 | 0 | 13 | 0 | 15 | 12 |
| Insert | 0 | 0 | 0 | 2 | 0 | 9 | 8 |
| Day | 0 | 0 | 0 | 6 | 0 | 8 | 0 |
| Calendar | 0 | 0 | 0 | 25 | 0 | 16 | 0 |
| Carsimulator | 0 | 0 | 0 | 13 | 7 | 24 | 0 |
| Tcas | 0 | 44 | 0 | 26 | 0 | 20 | 0 |
| Defroster | 0 | 54 | 0 | 41 | 0 | 48 | 0 |
| Schedule | 0 | 0 | 0 | 28 | 0 | 20 | 0 |
| Hashmap | 0 | 0 | 0 | 47 | 0 | 20 | 0 |
| Replace | 0 | 0 | 0 | 135 | 0 | 80 | 0 |
| Space | 0 | 0 | 0 | 72 | 1 | 14 | 0 |
| Flex | 0 | 0 | 0 | 40 | 0 | 0 | 0 |
| Make | 0 | 0 | 0 | 32 | 0 | 28 | 0 |
All stubborn mutants: download
A preprint version of the paper can be download from here.
@inproceedings{YaoHJ14,
author = {Yao, Xiangjuan and Harman, Mark and Jia, Yue},
title = {A Study of Equivalent and Stubborn Mutation Operators Using Human Analysis of Equivalence},
booktitle = {Proceedings of the 36th International Conference on Software Engineering},
series = {ICSE 2014},
year = {2014},
isbn = {978-1-4503-2756-5},
location = {Hyderabad, India},
pages = {919--930},
numpages = {12},
url = {http://doi.acm.org/10.1145/2568225.2568265},
doi = {10.1145/2568225.2568265},
publisher = {ACM},
keywords = {Equivalent Mutant, Mutation Testing, Stubborn Mutant},
}
yue.jia@ucl.ac.uk
2012-2013 © Xiangjuan Yao, Mark Harman and Yue Jia