Efficient Mutation Testing via Pre-Trained Language Models
Ahmed Khanfir, Renzo Degiovanni, Mike Papadakis, Yves Le Traon

TL;DR
This paper introduces $$BERT, a mutation testing method using pre-trained language models like CodeBERT to generate more natural faults, improving fault detection over traditional techniques and complementing them.
Contribution
The paper proposes using pre-trained language models for mutation testing, demonstrating improved fault detection and complementarity with existing methods.
Findings
$$BERT detects up to 17% more faults than PiTest.
$$BERT can identify 47 bugs missed by PiTest.
PiTest can find 13 bugs that $$BERT misses.
Abstract
Mutation testing is an established fault-based testing technique. It operates by seeding faults into the programs under test and asking developers to write tests that reveal these faults. These tests have the potential to reveal a large number of faults -- those that couple with the seeded ones -- and thus are deemed important. To this end, mutation testing should seed faults that are both "natural" in a sense easily understood by developers and strong (have high chances to reveal faults). To achieve this we propose using pre-trained generative language models (i.e. CodeBERT) that have the ability to produce developer-like code that operates similarly, but not exactly, as the target code. This means that the models have the ability to seed natural faults, thereby offering opportunities to perform mutation testing. We realise this idea by implementing BERT, a mutation testing…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Advanced Malware Detection Techniques
