defects4j icon indicating copy to clipboard operation
defects4j copied to clipboard

How to save mutated source code?

Open 2ira opened this issue 11 months ago • 2 comments

Hello,I am trying to get all the mutated source code ,but I'm facing problems.After looking through the Mution.pm,I find it uses defects4j/major/bin/mmlc script to run.The core code is "java -Xbootclasspath/p:$BASE/lib/mmlc.jar -Xbootclasspath/p:$BASE/lib/javac.jar -jar *" when I try to add export.mutants option,it failed and return "Compiling mutant definition (mml).......................................... FAIL Executed command: /home/ubuntu/defects4j/major/bin/mmlc /home/ubuntu/Csv/csv_1_fixed/.mml/default.mml 2>&1 Usage: java major.mml.MmlCompiler [] Cannot compile mml file: /home/ubuntu/Csv/csv_1_fixed/.mml/default.mml! at /home/ubuntu/defects4j/framework/core/Mutation.pm line 99. Compilation failed in require at /home/ubuntu/defects4j/framework/bin/defects4j line 195." So I want to know where and how I modify the configuration or code to save all the mutated source code. I would appreaciate it very much if you could help me!

2ira avatar Feb 03 '25 16:02 2ira

Hi @2ira,

I think what you are looking for is the configuration here. If you add relevant export options to the build target, then Major will export the source-code mutants when defects4j mutation is invoked.

Best, René

rjust avatar Mar 27 '25 00:03 rjust

What are the relevant export options? Could you show me what a correct configuration for saving mutated source code looks like? I've been trying to save mutated source code for a while now and cannot figure out how to save it.

esb7cp avatar Apr 11 '25 12:04 esb7cp