arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2203.03289cs.SE
收藏

$μ$ BERT:使用预训练的语言模型进行突变测试

$μ$BERT: Mutation Testing using Pre-Trained Language Models

Renzo Degiovanni, Mike Papadakis

摘要:

我们介绍$μ$ BERT,一个突变测试工具,使用预先训练的语言模型(代码BERT)来生成突变体。这是通过从作为输入的表达式中屏蔽一个标记并使用CodeBERT对其进行预测来完成的。因此,通过用预测的标记替换屏蔽的标记来生成突变体。我们评估$μ$ BERT的40个真正的故障从Defects4J,它可以检测到27的40个故障,而基线(PiTest)检测到26个。我们还表明,$μ$ BERT可以是2倍的成本效益比PiTest,当相同数量的突变体进行分析。此外,我们评估$μ$ 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑