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
205 stars 106 forks source link

integrate flacoco in Astor #314

Closed monperrus closed 3 years ago

monperrus commented 3 years ago

for @andre15silva

martinezmatias commented 3 years ago

Initial implementation: FlacocoFaultLocalization

Some test cases (to refactor and fix) FaultLocalizationExtensionTest

andre15silva commented 3 years ago

Introducing flacoco as the first dependency of astor results in the following example classpath while running test-runner:

(...):/home/andre/.m2/repository/eu/stamp-project/test-runner/3.0.0-SNAPSHOT/test-runner-3.0.0-SNAPSHOT.jar:/home/andre/.m2/repository/org/jacoco/org.jacoco.core/0.8.1/org.jacoco.core-0.8.1.jar:/home/andre/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/andre/.m2/repository/org/pitest/pitest-entry/1.4.7/pitest-entry-1.4.7.jar

If it is introduced as the last dependency of astor, it results in this:

(...):/home/andre/.m2/repository/eu/stamp-project/test-runner/3.0.0-SNAPSHOT/test-runner-3.0.0-SNAPSHOT.jar:/home/andre/.m2/repository/org/jacoco/org.jacoco.core/0.8.1/org.jacoco.core-0.8.1.jar:/home/andre/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar:/home/andre/.m2/repository/org/ow2/asm/asm/6.0/asm-6.0.jar

and test-runner fails.

This means there is some collision with other astor dependencies. It could also indicate that the classpath construction in either flacoco and/or test-runner could be improved to be more stable.

andre15silva commented 3 years ago

Update: small projects are working with no issue, but larger projects such as the math and lang ones are currently failing, due to an error in test-runner.

martinezmatias commented 3 years ago

Hi @andre15silva

Thanks for the update.

larger projects such as the math and lang ones are currently failing, due to an error in test-runner.

Is that failure related to the length of the command line? Reported in Issue 57 from TestRunner?

andre15silva commented 3 years ago

Hi @andre15silva

Thanks for the update.

Hi @martinezmatias

Is that failure related to the length of the command line? Reported in Issue 57 from TestRunner?

No, it's a different issue which I haven't been able to pin point. It happens during the execution of test cases, but it doesn't always fail during the execution of the same test case. I'll open a PR today with the small and big projects so you can see.

martinezmatias commented 3 years ago

I'll open a PR today with the small and big projects so you can see.

Perfect, thanks

andre15silva commented 3 years ago

FYI @martinezmatias ,

I think I have identified the issue with the large projects. See https://github.com/STAMP-project/test-runner/issues/108.

Hoping to have a PR to fix this in test-runner today and then test here.

martinezmatias commented 3 years ago

Thanks for the update @andre15silva .

andre15silva commented 3 years ago

With https://github.com/STAMP-project/test-runner/pull/110 and https://github.com/SpoonLabs/flacoco/pull/64, flacoco can handle large projects such as the mathXX ones.

Now the issue is understanding and possibly fix the discrepancies between gzoltar and flacoco results.

martinezmatias commented 3 years ago

Perfect @andre15silva !