This is a repository with all the required script files to run the experiments of our research article titled "Mutation analysis for evaluating code translation" published in the Springer EMSE journal.
The directory data
contains all the original programs used in our experiments, both in Java and Python.
Inside each directory, you will find the compiled class (Java), the original source code (program.java or program.py), the main class with all the tests (program_MAIN.java or program_MAIN.py), and a CSV file with the execution results for that program.
The directory mbta/treatment/representation/visitor
contains all the scripts needed to modify the dataset in order toa allow their execution, including mutants. Each visitor will run the specific task over the given files.
The directories mbta/j2py
and mbta/transcoder
contain scripts to run the data analysis over the specific results of both translators. Moreover, the former has data analysis scripts with joint results of both translators, such as mbta/transcoder/violin_plot_mtss_joint.py
to generate the violin plots shown in our paper.
The directories under test
contain scripts for modifying the test files.
The root file of this repository has all the scripts used to perform the tasks of MBTA as follows:
- Copy mains to new file (
copy_mains.py
) - Remove mains from original (
extract_mains.py
) - Generate mutants (using MuJava)
- Copy mains to original (
copy_mains.py
) - Compile originals (
compile.py
) - Execute originals (
execute_originals.py
)
- Copy mains to original mutants (
copy_mains_mutants.py
) - Compile original mutants (
compile_mutants.py
) - Translate original mutants (
translate_single.py
) - Execute original mutants (
execute_single.py
) - Copy mains to translated mutants (
copy_mains_mutants.py
) - Compile translated mutants (
compile_mutants.py
) - Execute translated mutants (
execute_mutants.py
)