Predictive Mutation Analysis via the Natural Language Channel in Source Code

Author:

Kim Jinhan1ORCID,Jeon Juyoung2,Hong Shin3,Yoo Shin1ORCID

Affiliation:

1. KAIST, Daejeon, Republic of Korea

2. Hyundai MOBIS, Seoul, Republic of Korea

3. Handong Global University, Pohang, Republic of Korea

Abstract

Mutation analysis can provide valuable insights into both the system under test and its test suite. However, it is not scalable due to the cost of building and testing a large number of mutants. Predictive Mutation Testing (PMT) has been proposed to reduce the cost of mutation testing, but it can only provide statistical inference about whether a mutant will be killed or not by the entire test suite. We propose Seshat, a Predictive Mutation Analysis (PMA) technique that can accurately predict the entire kill matrix , not just the Mutation Score (MS) of the given test suite. Seshat exploits the natural language channel in code, and learns the relationship between the syntactic and semantic concepts of each test case and the mutants it can kill, from a given kill matrix. The learnt model can later be used to predict the kill matrices for subsequent versions of the program, even after both the source and test code have changed significantly. Empirical evaluation using the programs in Defects4J shows that Seshat can predict kill matrices with an average F-score of 0.83 for versions that are up to years apart. This is an improvement in F-score by 0.14 and 0.45 points over the state-of-the-art PMT technique and a simple coverage-based heuristic, respectively. Seshat also performs as well as PMT for the prediction of the MS only. When applied to a mutant-based fault localisation technique, the predicted kill matrix by Seshat is successfully used to locate faults within the top 10 position, showing its usefulness beyond prediction of MS. Once Seshat trains its model using a concrete mutation analysis, the subsequent predictions made by Seshat are on average 39 times faster than actual test-based analysis. We also show that Seshat can be successfully applied to automatically generated test cases with an experiment using EvoSuite.

Funder

National Research Foundation of Korea

Institute for Information & Communications Technology Promotion

Samsung Electronics

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference54 articles.

1. Translating code comments to procedure specifications

2. A theory of dual channel constraints

3. SMOTE: Synthetic Minority Over-sampling Technique

4. Speeding up Mutation Testing via Regression Test Selection: An Extensive Study

5. Learning phrase representations using RNN encoder-decoder for statistical machine translation;Cho Kyunghyun;arXiv preprint arXiv:1406.1078,2014

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. FrMi: Fault-revealing Mutant Identification using killability severity;Information and Software Technology;2023-12

2. Contextual Predictive Mutation Testing;Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering;2023-11-30

3. Predicting higher order mutation score based on machine learning;Journal of Information and Telecommunication;2023-08-31

4. A Systematic Literature Review on Solutions of Mutation Testing Problems;2023 IEEE 8th International Conference On Software Engineering and Computer Systems (ICSECS);2023-08-25

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3