论文标题
$μ$ bert:使用预训练的语言模型进行突变测试
$μ$BERT: Mutation Testing using Pre-Trained Language Models
论文作者
论文摘要
我们介绍了$μ$ bert,这是一种使用预训练的语言模型(Codebert)生成突变体的突变测试工具。这是通过从给出的输入表达式中掩盖令牌并使用Codebert预测它来完成的。因此,突变体是通过用预测的代币代替蒙面令牌来产生的。我们评估了来自缺陷4J的40个实际故障的$μ$ bert,并表明它可以检测到40个故障中的27个,而基线(pitest)检测到其中26个。我们还表明,当分析相同数量的突变体时,$μ$ bert的成本效益比Pitest高2倍。此外,我们评估了程序主张推理技术使用时$μ$ bert的突变体的影响,并表明它们可以帮助生产更好的规格。最后,我们讨论了在我们的实验评估过程中由$μ$ bert产生的一些有趣突变体的质量和自然性。
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.