paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Spotting Code Mutation for Predictive Mutation Testing

面向预测性变异测试的代码变异识别
ASE Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering2024匹配度 3/10 · 论文属于机器学习辅助变异测试(预测性变异测试),与PL+AI的广义交叉有一定关联,但不涉及用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。其目标也不是用LLM/Agent改进程序分析,因此匹配度较低。引用 3 inbox
Yifan Zhao, Yizhou Chen, Zeyu Sun, Qingyuan Liang, Guoqing Wang, Dan Hao
crossref: 2026-09-12

AI 速览

一句话:提出 SODA 模型,用变异语义学习与对比采样捕捉变异体细微差异,提升预测性变异测试性能。

变异测试开销高,预测性变异测试(PMT)通过分类模型预测变异体是否被杀死。现有统计特征方法需昂贵动态特征且忽视代码文本;文本方法编码粗糙,难捕捉变异体细微差异及变异体-测试相关性。本文提出 SODA,采用变异语义学习,通过同变异体对比组采样强化变异体与测试的对应关系,并用对比学习捕捉细微代码变异及其对测试行为的影响。在跨项目和跨版本场景下,SODA 达到最优分类性能:kill-F1 提升 5.32%-114.92%,survive-F1 提升 0.04%-25.54%,准确率提升 4.25%-60.43%,且变异得分误差最低。

问题
预测性变异测试需要低成本预测变异测试结果,但现有模型难以有效利用代码文本并捕捉变异体与测试之间的细粒度关联。
方法
提出 SODA,采用变异语义学习,通过同变异体对比组采样强化变异体与测试的对应关系,并利用对比学习捕捉变异体的细微差异及其对测试行为的影响。
评估
在跨项目和跨版本场景下进行实验,比较分类性能指标(kill-F1、survive-F1、准确率)与变异得分误差,SODA 均优于基线并达到当前最优。
原文摘要(Abstract)

Mutation testing is widely used to measure the test adequacy of a project. Despite its popularity, mutation testing is time-consuming and extremely expensive. To mitigate this problem, researchers propose Predictive Mutation Testing (PMT). Existing PMT approaches build classification models based on statistical program features or source code of programs to predict mutation testing results. Previous statistical feature-based PMT models need expensive overhead to collect dynamic features and neglect the rich information inherent in code text. Previous text-based PMT models extract essential code elements as input and outperform the feature-based models. However, they encode code text in a plain way. Therefore, they cannot sensitively capture subtle differences in mutants and they have difficulty in capturing the correlation between mutants and tests. To address these challenges, we propose a new model, SODA. SODA uses a new learning strategy, Mutational Semantic Learning, to make our model spot code mutation and its impact on test behavior. In particular, we employ a new sampling strategy to reinforce the corresponding relationship between mutants and tests by sampling same-mutant contrastive groups. Then we employ contrastive learning to make our model capture subtle differences in mutants. We conduct experiments to investigate the performance of SODA. The results demonstrate that both in the cross-project and cross-version scenarios, SODA achieves state-of-the-art classification performance (improves upon baselines by 5.32%-114.92% in kill-F1 score, 0.04%-25.54% in survive-F1 score, 4.25%-60.43% in accuracy) and has the lowest mutation score error.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8353,
  title = {Spotting Code Mutation for Predictive Mutation Testing},
  author = {Yifan Zhao and Yizhou Chen and Zeyu Sun and Qingyuan Liang and Guoqing Wang and Dan Hao},
  booktitle = {ASE},
  year = {2024},
  doi = {10.1145/3691620.3695491}
}