计算机科学 > 软件工程
[提交于 2022年3月8日]
标题:$\mu$BERT: Mutation Testing using Pre-Trained Language Models
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We introduce $\mu$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 $\mu$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 $\mu$BERT can be 2 times more cost-effective than PiTest, when the same number of mutants are analysed. Additionally, we evaluate the impact of $\mu$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 $\mu$BERT during our experimental evaluation.
提交历史
来自:Renzo Degiovanni[v1] 2022年3月8日 星期二 00:00:00 UTC