Generating Python Mutants From Bug Fixes Using Neural Machine Translation
Due to the fast-paced development of technology, the software has become a crucial aspect of modern life, facilitating the operation and management of hardware devices. Nevertheless, using substandard software can result in severe complications for users, putting human lives at risk. This underscore...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
IEEE
2023-01-01
|
Series: | IEEE Access |
Subjects: | |
Online Access: | https://ieeexplore.ieee.org/document/10210051/ |
_version_ | 1797741556681146368 |
---|---|
author | Sergen Asik Ugur Yayan |
author_facet | Sergen Asik Ugur Yayan |
author_sort | Sergen Asik |
collection | DOAJ |
description | Due to the fast-paced development of technology, the software has become a crucial aspect of modern life, facilitating the operation and management of hardware devices. Nevertheless, using substandard software can result in severe complications for users, putting human lives at risk. This underscores the significance of error-free and premium-quality software. Verification and validation are essential in ensuring high-quality software development; software testing is integral to this process. Although code coverage is a prevalent method for assessing the efficacy of test suites, it has some limitations. Therefore, mutation testing is proposed as a remedy to tackle these limitations. Furthermore, mutation testing is recognized as a method for directing test case creation and evaluating the effectiveness of test suites. Our proposed method involves autonomously learning mutations from faults in real-world software applications. Firstly, our approach involves extracting bug fixes at the method-level, classifying them according to mutation types, and performing code abstraction. Subsequently, the approach utilizes a deep learning technique based on neural machine translation to develop mutation models. Our method has been trained and assessed using approximately <inline-formula> <tex-math notation="LaTeX">$\sim $ </tex-math></inline-formula>588k bug fix commits extracted from GitHub. The results of our experimental assessment indicate that our models can forecast mutations resembling resolved bugs in 6% to 35% of instances. The models effectively revert fixed code to its original buggy version, reproducing the original bug and generating various other buggy codes with up to 94% accuracy. More than 96% of the generated mutants also demonstrate lexical and syntactic accuracy. |
first_indexed | 2024-03-12T14:28:25Z |
format | Article |
id | doaj.art-7dfe9301805043fab025ea2cedc8c524 |
institution | Directory Open Access Journal |
issn | 2169-3536 |
language | English |
last_indexed | 2024-03-12T14:28:25Z |
publishDate | 2023-01-01 |
publisher | IEEE |
record_format | Article |
series | IEEE Access |
spelling | doaj.art-7dfe9301805043fab025ea2cedc8c5242023-08-17T23:00:15ZengIEEEIEEE Access2169-35362023-01-0111856788569310.1109/ACCESS.2023.330269510210051Generating Python Mutants From Bug Fixes Using Neural Machine TranslationSergen Asik0https://orcid.org/0000-0002-3388-4047Ugur Yayan1https://orcid.org/0000-0003-1394-5209Department of Software Engineering, Eskisehir Osmangazi University, Eskisehir, TurkeyDepartment of Software Engineering, Eskisehir Osmangazi University, Eskisehir, TurkeyDue to the fast-paced development of technology, the software has become a crucial aspect of modern life, facilitating the operation and management of hardware devices. Nevertheless, using substandard software can result in severe complications for users, putting human lives at risk. This underscores the significance of error-free and premium-quality software. Verification and validation are essential in ensuring high-quality software development; software testing is integral to this process. Although code coverage is a prevalent method for assessing the efficacy of test suites, it has some limitations. Therefore, mutation testing is proposed as a remedy to tackle these limitations. Furthermore, mutation testing is recognized as a method for directing test case creation and evaluating the effectiveness of test suites. Our proposed method involves autonomously learning mutations from faults in real-world software applications. Firstly, our approach involves extracting bug fixes at the method-level, classifying them according to mutation types, and performing code abstraction. Subsequently, the approach utilizes a deep learning technique based on neural machine translation to develop mutation models. Our method has been trained and assessed using approximately <inline-formula> <tex-math notation="LaTeX">$\sim $ </tex-math></inline-formula>588k bug fix commits extracted from GitHub. The results of our experimental assessment indicate that our models can forecast mutations resembling resolved bugs in 6% to 35% of instances. The models effectively revert fixed code to its original buggy version, reproducing the original bug and generating various other buggy codes with up to 94% accuracy. More than 96% of the generated mutants also demonstrate lexical and syntactic accuracy.https://ieeexplore.ieee.org/document/10210051/Software qualitysoftware verification and validationsoftware testingmutation testingmining software repositoriesbug fixes |
spellingShingle | Sergen Asik Ugur Yayan Generating Python Mutants From Bug Fixes Using Neural Machine Translation IEEE Access Software quality software verification and validation software testing mutation testing mining software repositories bug fixes |
title | Generating Python Mutants From Bug Fixes Using Neural Machine Translation |
title_full | Generating Python Mutants From Bug Fixes Using Neural Machine Translation |
title_fullStr | Generating Python Mutants From Bug Fixes Using Neural Machine Translation |
title_full_unstemmed | Generating Python Mutants From Bug Fixes Using Neural Machine Translation |
title_short | Generating Python Mutants From Bug Fixes Using Neural Machine Translation |
title_sort | generating python mutants from bug fixes using neural machine translation |
topic | Software quality software verification and validation software testing mutation testing mining software repositories bug fixes |
url | https://ieeexplore.ieee.org/document/10210051/ |
work_keys_str_mv | AT sergenasik generatingpythonmutantsfrombugfixesusingneuralmachinetranslation AT uguryayan generatingpythonmutantsfrombugfixesusingneuralmachinetranslation |