A Preliminary Investigation into Using Machine Learning Algorithms to Identify Minimal and Equivalent Mutants
Claudinei Brito, Vinícius H. S. Durelli, Rafael S. Durelli, Simone R. S. Souza, Auri Marcelo Rizzo Vincenzi, Márcio Eduardo Delamaro · 2020
Two issues that have been hampering the widespread adoption of mutation testing are redundant and equivalent mutants. Minimal mutation has been recently introduced to mitigate these two issues by generating and selecting only a subset of non-redundant mutants. Equivalent mutants are syntactically different from the original program, but functionally identical, so it is impossible to come up with test data capable of making equivalent mutants behave differently from the original program under test. In order to mitigate the cost of applying mutation testing, we set out to investigate how machine learning algorithms that generate predictive models can be used to classify mutants as belonging to the minimal set or equivalent. More specifically, we extract a set of features (i.e., properties) from programs, mutants, and test cases, which in turn serve as input to the creation of predictive models. To shed some light on the effectiveness of our approach, we carried out an experiment in which we trained seven different machine learning classifiers, the best of which obtained 81.88% and 80.30% accuracy to classify minimal and equivalent mutants, respectively. Results from our experiment would seem to indicate that our approach can effectively mitigate some of the costs associated with mutation testing by relying on the identification of minimal sets and equivalent mutants.