arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.14508cs.SE
收藏

突变测试研究中人为错误和真实错误的句法与语义相似性

Syntactic Vs. Semantic similarity of Artificial and Real Faults in Mutation Testing Studies

Milos Ojdanic, Aayush Garg, Ahmed Khanfir, Renzo Degiovanni, Mike Papadakis, Yves Le Traon

摘要:

错误播种通常用于对照研究,以评估和比较测试技术。这些技术的核心是假设人工播种故障涉及某种形式的现实属性,从而提供现实的实验结果。为了加强真实性,最近的一系列研究使用了先进的机器学习技术,如深度学习和自然语言处理(NLP),以播种看起来像(句法上)真实的错误,这意味着错误的真实性与句法相似性有关。这就提出了一个问题,是否播种语法相似的故障确实导致语义相似的故障,更一般地说,是否语法不同的故障是远离(语义)从真正的。我们回答这个问题,采用4种错误播种技术(PiTest -一种流行的突变测试工具,IBIR -一种手动制作的错误模式工具,DeepMutation -一种基于学习的错误播种框架和CodeBERT -一种使用代码嵌入的新型突变测试工具),并证明语法相似性并不反映语义相似性。我们还表明,Defects 4J V2的60%、47%、43%和7%的真实错误在语义上与CodeBERT、PiTest、IBIR和DeepMutation错误相似。然后,我们对这些技术进行了客观的比较,发现CodeBERT和PiTest具有类似于IBIR和DeepMutation的故障检测能力,IBIR是最具成本效益的技术。此外,PiTest、CodeBERT、IBIR和DeepMutation的总体故障检测率平均为54%、53%、37%和7%。

英文摘要:

Fault seeding is typically used in controlled studies to evaluate and compare test techniques. Central to these techniques lies the hypothesis that artificially seeded faults involve some form of realistic properties and thus provide realistic experimental results. In an attempt to strengthen realism, a recent line of research uses advanced machine learning techniques, such as deep learning and Natural Language Processing (NLP), to seed faults that look like (syntactically) real ones, implying that fault realism is related to syntactic similarity. This raises the question of whether seeding syntactically similar faults indeed results in semantically similar faults and more generally whether syntactically dissimilar faults are far away (semantically) from the real ones. We answer this question by employing 4 fault-seeding techniques (PiTest - a popular mutation testing tool, IBIR - a tool with manually crafted fault patterns, DeepMutation - a learning-based fault seeded framework and CodeBERT - a novel mutation testing tool that use code embeddings) and demonstrate that syntactic similarity does not reflect semantic similarity. We also show that 60%, 47%, 43%, and 7% of the real faults of Defects4J V2 are semantically resembled by CodeBERT, PiTest, IBIR, and DeepMutation faults. We then perform an objective comparison between the techniques and find that CodeBERT and PiTest have similar fault detection capabilities that subsume IBIR and DeepMutation, and that IBIR is the most cost-effective technique. Moreover, the overall fault detection of PiTest, CodeBERT, IBIR, and DeepMutation was, on average, 54%, 53%, 37%, and 7%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑