program-repair / RepairThemAll

Automatic Repair Framework that abstract repair tools and bug benchmarks
MIT License
68 stars 23 forks source link

[bug] compiling D4J projects #14

Open martinezmatias opened 5 years ago

martinezmatias commented 5 years ago

The bugfix I commited yesterday is incorrect. https://github.com/program-repair/RepairThemAll/commit/355f9ac3d5a121e2c0c75eb69ef265a7758416aa#diff-a0dddd360955b4f2a6ecb343397ea54eR192

It solves some cases i.e., Math projects, but breaks others (e.g., Time). The problem is in the information retrieved from Dj4 export cp.test. For example, for Math-104 it does not include the dependency to org.apache.commons.discovery. Thus, the library was never introduced. Before reverting the patch, I would like to discuss possible alternatives to this issue. WDYT?

martinezmatias commented 5 years ago

The "easier" solution could be to add to the classpath all jars found in the folder lib from the project and bug. However, I dont know whether this could have an unexpected effect.

tdurieux commented 5 years ago

There are unexpected effects, I used this solution in the past but reduce the repairability.

martinezmatias commented 5 years ago

There are unexpected effects, I used this solution in the past but reduce the repairability.

Yes, I imagine that. So, I would undo the patch.

martinezmatias commented 5 years ago

Actually, the script does not consider the library located on the json file from the project (property lib). https://github.com/program-repair/RepairThemAll/blob/355f9ac3d5a121e2c0c75eb69ef265a7758416aa/script/core/benchmarks/Defects4J.py#L160 In the case of Math, the lib property indicates the jar commons-discovery-0.5.jar which is the missing. Do you think that adding the jars contained in the Json's lib has unexpected effects? (I do not refer to the folder lib from the project/bug)

tdurieux commented 5 years ago

Do you think that adding the jars contained in the Json's lib has unexpected effects?

Yes, it does :/ I had some test execution inconsistencies. I really don't know what to do.