SpoonLabs / astor

Automatic program repair for Java with generate-and-validate techniques :v::v:: jGenProg (2014) - jMutRepair (2016) - jKali (2016) - DeepRepair (2017) - Cardumen (2018) - 3sfix (2018)
https://hal.archives-ouvertes.fr/hal-01321615/document
GNU General Public License v2.0
208 stars 106 forks source link

Problem with outputing patch.diff for ProgramVariant #309

Closed WuYff closed 3 years ago

WuYff commented 3 years ago

I am using jGenProg and trying to get the patch.diff for two kinds of ProgramVariant: (1) uncompilable (2) compilable but fail test cases.

I modified the code in AstorCoreEngine.java.I called saveVariant() method for these two kinds of ProgramVariant at the corresponding part: uncompliable and fail tests (add a else block). I find that calling saveVariant() method only generates code (the variant-id and variant-id_f folder) but does not generate the patch.dff file. Thus, I called computeDiff() method immediately after I called saveVariant() method. Though this time the patch.diff file is generated, it is empty. My code modification is shown as the screenshot below.

I don't know which part of code I missed. May I ask how can I get the patch.diff for these two kinds of ProgramVariant?

issue
WuYff commented 3 years ago

Close this issue for I fixed this problem by calling the computePatchDiff method in the atEnd() method