μBERT: Mutation Testing using Pre-Trained Language Models

03/07/2022
by   Renzo Degiovanni, et al.
0

We introduce μBERT, a mutation testing tool that uses a pre-trained language model (CodeBERT) to generate mutants. This is done by masking a token from the expression given as input and using CodeBERT to predict it. Thus, the mutants are generated by replacing the masked tokens with the predicted ones. We evaluate μBERT on 40 real faults from Defects4J and show that it can detect 27 out of the 40 faults, while the baseline (PiTest) detects 26 of them. We also show that μBERT can be 2 times more cost-effective than PiTest, when the same number of mutants are analysed. Additionally, we evaluate the impact of μBERT's mutants when used by program assertion inference techniques, and show that they can help in producing better specifications. Finally, we discuss about the quality and naturalness of some interesting mutants produced by μBERT during our experimental evaluation.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/09/2023

Efficient Mutation Testing via Pre-Trained Language Models

Mutation testing is an established fault-based testing technique. It ope...
research
12/29/2021

Syntactic Vs. Semantic similarity of Artificial and Real Faults in Mutation Testing Studies

Fault seeding is typically used in controlled studies to evaluate and co...
research
02/12/2020

DeepMutation: A Neural Mutation Tool

Mutation testing can be used to assess the fault-detection capabilities ...
research
09/10/2018

Effortless Fault Localisation: Conformance Testing of Real-Time Systems in Ecdar

Model checking of real-time systems has evolved throughout the years. Re...
research
02/26/2019

Amortising the Cost of Mutation Based Fault Localisation using Statistical Inference

Mutation analysis can effectively capture the dependency between source ...
research
01/29/2023

Specification Inference for Evolving Systems

In this paper, we propose an assertion-based approach to capture softwar...
research
09/15/2021

DeepMetis: Augmenting a Deep Learning Test Set to Increase its Mutation Score

Deep Learning (DL) components are routinely integrated into software sys...

Please sign up or login with your details

Forgot password? Click here to reset