Mutation analysis measures test suite adequacy, the degree to which a test suite detects seeded faults: one test suite is better than another if it detects more mutants. Mutation analysis effectiveness rests on the assumption that mutants are coupled with real faults i.e. mutant detection is strongly correlated with real fault detection. The work that validated this also showed that a large portion of defects remain out of reach.
We introduce tailored mutation operators to reach and capture these defects. Tailored mutation operators are built from and apply to an existing codebase and its history. They can, for instance, identify and replay errors specific to the project for which they are tailored. As our point of departure, we define tailored mutation operators for identifiers, which mutation analysis has largely ignored, because there are too many ways to mutate them. Evaluated on the Defects4J dataset, our new mutation operators creates mutants coupled to 14% more faults, compared to traditional mutation operators.
These new mutation operators, however, quadruple the number of mutants. To combat this problem, we propose a new approach to mutant selection focusing on the location at which to apply mutation operators and the unnaturalness of the mutated code. The results demonstrate that the location selection heuristics produce mutants more closely coupled to real faults for a given budget of mutation operator applications.
In summary, this paper defines and explores tailored mutation operators, advancing the state of the art in mutation testing in two ways: 1) it suggests mutation operators that mutate identifiers and literals, extending mutation analysis to a new class of faults and 2) it demonstrates that selecting the location where a mutation operator is applied decreases the number of generated mutants without affecting the coupling of mutants and real faults.
What Bugs Do Prolog Students Write? An Empirical Taxonomy and Data-Driven Mutation Framework
INESC-ID / IST, Universidade de Lisboa(里斯本大学);Artificial Intelligence Research Institute, Consejo Superior de Investigaciones Científicas(西班牙国家研究委员会人工智能研究所);Carnegie Mellon University(卡内基梅隆大学)
Characterizing Real-World Bugs in Tile Programs for Automated Bug Detection
University of Texas at Dallas(达拉斯大学);Institute of Systems for Advanced Computing, Fudan University(复旦大学高级计算系统研究所);Beijing Tongming Lake Information Technology Application Innovation Center(北京通明湖信息技术应用创新中心);Shanghai Institute of Systems for Open Computing(上海开放计算系统研究所);Key Lab of HCST (PKU), MOE(北京大学计算机辅助设计与图形学教育部重点实验室;计算机科学系,北京大学);SCS, Peking University
Beijing Jiaotong University(北京交通大学);Beijing Key Laboratory of Traffic Data Mining and Embodied Intelligence(北京市交通数据挖掘与具身智能重点实验室);Singapore Management University(新加坡管理大学);University College London(伦敦大学学院);University of Luxembourg(卢森堡大学);King’s College London(伦敦国王学院)
MutDafny: A Mutation-Based Approach to Assess Dafny Specifications
INESC TEC, Faculdade de Engenharia, Universidade do Porto(波尔图大学工程学院);Faculdade de Engenharia, Universidade do Porto & LASIGE, Universidade de Lisboa(波尔图大学工程学院)
KQFuzz: Knowledge-Guided Fuzzing for Quantum Libraries via Large Language Models
Shanghai Jiao Tong University(上海交通大学);Nanyang Technological University(南洋理工大学);Hong Kong University of Science and Technology(香港科技大学);Zhejiang University of Technology(浙江工业大学);College of Computing and Data Science(计算与数据科学学院);School of Physical and Mathematical Sciences(物理与数学科学学院)