Latent Mutants: A large-scale study on the Interplay between mutation testing and software evolution
Jeongju Sohn, Ezekiel Soremekun, Michail Papadakis
TL;DR
This study introduces latent mutants—the subset of mutation-test mutants that stay live across a version but are killed in later revisions—and situates them within software evolution. By analyzing 131,308 mutants across 13 Defects4J Java projects, the authors show latent mutants exist in most projects, endure about $104$ days on average, and can be predicted from historical code-change features and mutation operators using a Random Forest model with $acc=0.87$ and $bal ext{-}acc=0.67$, plus a MAP above baseline for ranking. The work reveals that latent mutants often arise due to changes in dependent code rather than the mutated lines themselves and that certain mutation operators are more prone to yield latent mutants, connecting mutation testing with long-term code maintenance. Overall, latent mutants offer a practical avenue to focus mutation testing and test development on mutations that are most likely to reveal future faults, enabling durable improvements to test suites in evolving software.
Abstract
In this paper we apply mutation testing in an in-time fashion, i.e., across multiple project releases. Thus, we investigate how the mutants of the current version behave in the future versions of the programs. We study the characteristics of what we call latent mutants, i.e., the mutants that are live in one version and killed in later revisions, and explore whether they are predictable with these properties. We examine 131,308 mutants generated by Pitest on 13 open-source projects. Around 11.2% of these mutants are live, and 3.5% of them are latent, manifesting in 104 days on average. Using the mutation operators and change-related features we successfully demonstrate that these latent mutants are identifiable, predicting them with an accuracy of 86% and a balanced accuracy of 67% using a simple random forest classifier.
