Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch but no diff #6

Open
jose opened this issue Jul 29, 2019 · 4 comments
Open

Patch but no diff #6

jose opened this issue Jul 29, 2019 · 4 comments

Comments

@jose
Copy link

jose commented Jul 29, 2019

Hi,

I have just noticed there is not a diff for every single patch. For example, the following result.json does not include a diff (as others result.json files do, e.g., here or here)

$ cat results/Bugs.jar/Accumulo/72fd6bec/Cardumen/0/result.json

{
  "repair_end": "2019-01-02 23:46:13.040020",
  "repair_begin": "2019-01-02 23:29:29.554319",
  "patches": [
    {
      "patchhunks": [
        {
          "MODIFIED_FILE_PATH": "\\/tmp\\/Cardumen_Bug_dot_jar_Accumulo_72fd6bec\\/.\\/output_astor\\/AstorMain-Accumulo-72fd6bec\\/\\/src\\/\\/variant-242\\/org\\/apache\\/accumulo\\/minicluster\\/MiniAccumuloCluster.java",
          "ORIGINAL_CODE": "builder.environment().put(\\\"ACCUMULO_HOME\\\", config.getDir().getAbsolutePath())",
          "INGREDIENT_SCOPE": "-",
          "PATCH_HUNK_CODE": "(org.apache.accumulo.minicluster.MiniAccumuloCluster.INSTANCE_NAME) + (java.io.File.separator)",
          "INGREDIENT_PARENT": "(_String_0 + (java.io.File.separator))",
          "LOCATION": "org.apache.accumulo.minicluster.MiniAccumuloCluster",
          "BUGGY_CODE_TYPE": "CtInvocationImpl|CtBlockImpl",
          "OPERATOR": "ExpressionReplaceOperator",
          "PATH": "\\/tmp\\/Cardumen_Bug_dot_jar_Accumulo_72fd6bec\\/minicluster\\/src\\/main\\/java\\/org\\/apache\\/accumulo\\/minicluster\\/MiniAccumuloCluster.java",
          "LINE": "157",
          "MP_RANKING": "23",
          "SUSPICIOUNESS": "0.577",
          "PATCH_HUNK_TYPE": "CtBinaryOperatorImpl|CtBlockImpl"
        }
      ],
      "GENERATION": "121",
      "VARIANT_ID": "242",
      "TIME": "942",
      "VALIDATION": "|true|0|6|[]|",
      "FOLDER_SOLUTION_CODE": "\\/tmp\\/Cardumen_Bug_dot_jar_Accumulo_72fd6bec\\/.\\/output_astor\\/AstorMain-Accumulo-72fd6bec\\/\\/bin\\/\\/variant-242"
    }
  ]
}

However, there are two diffs in the repair.log file: here and here. Do you by any chance know which one fixes the bug?

--
Best,
Jose

@jose
Copy link
Author

jose commented Jul 29, 2019

Here are a few more cases (all from Kali):

The common error is IOError: [Errno 2] No such file or directory: u'/tmp/Kali_Defects4J_Closure_133/patches_hcqe/Patch_6/diff'. Any idea whether this error could be due to a bug in the repair tool or a bug in the RepairThemAll infrastructure?

@tdurieux
Copy link
Collaborator

Thanks for the issue.

That are tricky questions since they are related to repair tools that I don't perfectly know.

For Cardumen, I will let @martinezmatias answer the question :)

For Kali, I know that the implementation of the result is different for Kali in Arja and maybe I miss a specific case. I will run those bug locally to see what is happening.
What is happening is that the RepairThemAll is expecting a file to be present in the folder and the file does not exist and I don't know what is the reason.

@jose
Copy link
Author

jose commented Jul 30, 2019

Hi @tdurieux,

I will run those bug locally to see what is happening.
What is happening is that the RepairThemAll is expecting a file to be present in the folder and the file does not exist and I don't know what is the reason.

I've just ran the 6 cases I pointed out and here are my findings. (Long story short, I did not manage to reproduce the issue)

Bugs.jar/Accumulo/72fd6bec/Cardumen

$ python script/repair.py Cardumen --benchmark Bugs.jar --id Accumulo-72fd6bec
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Cardumen Bugs.jar_Accumulo_72fd6bec 0:00:36
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

No log file in /tmp/RepairThemAllFramework/results/.

Defects4J/Closure/133/Kali

$ python script/repair.py Kali --benchmark Defects4J --id closure-133
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Kali Defects4J_Closure_133 0:03:34
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

$ find /tmp/RepairThemAllFramework/results/Defects4J/Closure/133/Kali/0
/tmp/RepairThemAllFramework/results/Defects4J/Closure/133/Kali/0/
/tmp/RepairThemAllFramework/results/Defects4J/Closure/133/Kali/0/repair.log

(here is the repair.log file)

Defects4J/Math/8/Kali

$ python script/repair.py Kali --benchmark Defects4J --id math-8
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Kali Defects4J_Math_8 0:23:51
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

$ find /tmp/RepairThemAllFramework/results/Defects4J/Math/8/Kali/0
/tmp/RepairThemAllFramework/results/Defects4J/Math/8/Kali/0/
/tmp/RepairThemAllFramework/results/Defects4J/Math/8/Kali/0/repair.log

(here is the repair.log file)

Defects4J/Math/85/Kali

$ python script/repair.py Kali --benchmark Defects4J --id math-85
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Kali Defects4J_Math_85 0:02:29
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

$ find /tmp/RepairThemAllFramework/results/Defects4J/Math/85/Kali/0
/tmp/RepairThemAllFramework/results/Defects4J/Math/85/Kali/0
/tmp/RepairThemAllFramework/results/Defects4J/Math/85/Kali/0/repair.log

(here is the repair.log file)

IntroClassJava/digits/c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003/Kali

$ python script/repair.py Kali --benchmark IntroClassJava --id digits_c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Kali IntroClassJava_digits_c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003 0:00:16
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

$ find /tmp/RepairThemAllFramework/results/IntroClassJava/digits/c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003/Kali/0
/tmp/RepairThemAllFramework/results/IntroClassJava/digits/c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003/Kali/0/
/tmp/RepairThemAllFramework/results/IntroClassJava/digits/c5d8f924b86adfeafa7f520559aeb8bd0c3c178efe2500c4054c5ce51bcdbfc2da2e3d9fd5c73f559a7cb6c3b3555b04646111404744496cbcf31caa90e5beb4_003/Kali/0/repair.log

(here is the repair.log file)

digits/d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000/Kali

$ python script/repair.py Kali --benchmark IntroClassJava --id digits_d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000
1 Running, 0 Waiting, 0/1 Finished, 0 Patched, 0 Error
Running:
1. Kali IntroClassJava_digits_d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000 0:00:13
Patched bug:


1 Finished, 0 Patched, 1 Error

Patched bug:
Check the results and logs in /tmp/RepairThemAllFramework/results/

$ find /tmp/RepairThemAllFramework/results/IntroClassJava/digits/d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000/Kali/0
/tmp/RepairThemAllFramework/results/IntroClassJava/digits/d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000/Kali/0
/tmp/RepairThemAllFramework/results/IntroClassJava/digits/d5059e2b1493f91b32bb0c2c846d8461c50356f709a91792b6b625e112675de4edac2a09fa627d58c4651c662bbcf2c477660469b9327ed9427b43c25e4e070c_000/Kali/0/repair.log

(here is the repair.log file)

--
Best,
Jose

@tdurieux
Copy link
Collaborator

tdurieux commented Aug 1, 2019

I really don't know what is happening :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants