一句话:提出 PITMuS 工具,将 PIT 字节码级变异报告重建为源码级变异体,自动生成可复用的缺陷数据集。
Java 中广泛使用的变异测试工具 PIT 在字节码层面生成变异体,只报告变异元数据而非对应的源码编辑,导致这些变异体难以检查、重放,也难以作为结构化缺陷制品复用。本文提出 PITMuS:给定标准 PIT 报告与原始 Java 源码,并在可用时使用编译后的字节码,PITMuS 能够定位受影响的源码语句,施加对应编辑,并将结果与其所属方法、文档及变异元数据关联;该工具还支持源码级变异体注入,用于检查、重放和下游实验。作者在 8 个开源 Java 系统上评估 PITMuS,从 PIT 报告的 69,229 个变异中生成 69,198 个源码级原始–变异方法对,覆盖 1,913 个源文件,对 99.96% 的变异记录成功产出源码级配对。结果表明,字节码级变异报告可以高覆盖率地转换为可检查、上下文丰富的源码制品,服务于软件测试、程序修复与基于学习的软件工程。
Mutation testing provides a scalable way to generate controlled faults for software testing and empirical software engineering. In Java, PIT is a widely used mutation testing tool that creates large numbers of mutants for evaluating test suites. However, PIT creates mutants at the bytecode level and reports mutation metadata rather than the corresponding source-level edits. Consequently, these mutants are difficult to inspect, replay, and reuse as structured bug artifacts. We present PITMuS, a tool that reconstructs PIT mutants at the source level and automatically generates reusable mutation-based bug datasets. Given standard PIT reports and the original Java source, and using compiled bytecode when available, PITMuS localizes the affected source statement, applies the corresponding edit, and associates the result with its enclosing method, documentation, and mutation metadata. The tool also supports source-level mutant injection for inspection, replay, and downstream experimentation. We evaluate PITMuS on eight open-source Java systems. From 69,229 mutations reported by PIT, PITMuS produces 69,198 source- level original–mutant method pairs across 1,913 source files, yield- ing a source-level pair for 99.96% of the reported mutation records. These results show that bytecode-level mutation reports can be converted at high coverage into inspectable, context-rich source artifacts for software testing, program repair, and learning-based software engineering.