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

-faultlocalization cocospoon #332

Closed KwanghoKim closed 3 years ago

KwanghoKim commented 3 years ago

Hi

I have one more question.

I checked to "List of extension points of Astor"(https://github.com/SpoonLabs/astor/blob/master/docs/extension_points.md) and then So I added "-faultlocalization cocospoon" like below command line.

But, error message occurs.

I want to change faultlocalization strategy and compare between gzoltar and cocospoon. I found source code about faultlocalization property, but I don't know what to do for testing using cocospoon.

(src/main/java/fr/inria/astor/core/solutionsearch/AstorCoreEngine.java) protected void loadFaultLocalization() throws Exception {

            // Fault localization
            String flvalue = ConfigurationProperties.getProperty("faultlocalization").toLowerCase();
            if (flvalue.equals("gzoltar")) {
                    this.setFaultLocalization(new GZoltarFaultLocalization());
            } else if (flvalue.equals("cocospoon")) {
                    this.setFaultLocalization(new CocoFaultLocalization());
            } else
                    this.setFaultLocalization(
                                    (FaultLocalizationStrategy) PlugInLoader.loadPlugin(ExtensionPoints.FAULT_LOCALIZATION));

    }

(Error message)

kwangho@kwangho-750XDA:~/workspace/astor$ java -cp $(cat /tmp/astor-classpath.txt):target/classes fr.inria.main.evolution.AstorMain -mode jgenprog -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes/ -bintestfolder /target/test-classes/ -location /home/kwangho/workspace/astor/examples/Math-issue-280/ -dependencies examples/Math-issue-280/lib -faultlocalization cocospoon Classpath [/home/kwangho/workspace/astor/examples/Math-issue-280/lib/, /home/kwangho/workspace/astor/examples/Math-issue-280/lib/junit-4.4.jar, /home/kwangho/.m2/repository/org/apache/logging/log4j/log4j-1.2-api/2.13.3/log4j-1.2-api-2.13.3.jar, /home/kwangho/.m2/repository/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar, /home/kwangho/.m2/repository/org/apache/logging/log4j/log4j-core/2.13.3/log4j-core-2.13.3.jar, /home/kwangho/.m2/repository/fr/inria/gforge/spoon/spoon-core/8.3.0/spoon-core-8.3.0.jar, /home/kwangho/.m2/repository/org/eclipse/jdt/org.eclipse.jdt.core/3.23.0/org.eclipse.jdt.core-3.23.0.jar, /home/kwangho/.m2/repository/com/martiansoftware/jsap/2.1/jsap-2.1.jar, /home/kwangho/.m2/repository/org/apache/maven/maven-model/3.6.3/maven-model-3.6.3.jar, /home/kwangho/.m2/repository/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar, /home/kwangho/.m2/repository/org/apache/commons/commons-lang3/3.11/commons-lang3-3.11.jar, /home/kwangho/.m2/repository/org/tukaani/xz/1.8/xz-1.8.jar, /home/kwangho/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.11.3/jackson-databind-2.11.3.jar, /home/kwangho/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.11.3/jackson-annotations-2.11.3.jar, /home/kwangho/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.11.3/jackson-core-2.11.3.jar, /home/kwangho/.m2/repository/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar, /home/kwangho/.m2/repository/org/apache/maven/shared/maven-invoker/3.0.1/maven-invoker-3.0.1.jar, /home/kwangho/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar, /home/kwangho/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar, /home/kwangho/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar, /home/kwangho/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar, /home/kwangho/.m2/repository/junit/junit/4.13.1/junit-4.13.1.jar, /home/kwangho/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar, /home/kwangho/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.1.0/junit-jupiter-engine-5.1.0.jar, /home/kwangho/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar, /home/kwangho/.m2/repository/org/junit/platform/junit-platform-engine/1.1.0/junit-platform-engine-1.1.0.jar, /home/kwangho/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.1.0/junit-jupiter-api-5.1.0.jar, /home/kwangho/.m2/repository/org/opentest4j/opentest4j/1.0.0/opentest4j-1.0.0.jar, /home/kwangho/.m2/repository/org/junit/platform/junit-platform-commons/1.1.0/junit-platform-commons-1.1.0.jar, /home/kwangho/.m2/repository/com/gzoltar/gzoltar/0.1.1/gzoltar-0.1.1.jar, /home/kwangho/.m2/repository/com/gzoltar/com.gzoltar.core/1.7.2/com.gzoltar.core-1.7.2.jar, /home/kwangho/.m2/repository/org/javassist/javassist/3.24.1-GA/javassist-3.24.1-GA.jar, /home/kwangho/.m2/repository/org/jacoco/org.jacoco.core/0.8.1/org.jacoco.core-0.8.1.jar, /home/kwangho/.m2/repository/org/ow2/asm/asm/6.0/asm-6.0.jar, /home/kwangho/.m2/repository/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.jar, /home/kwangho/.m2/repository/org/ow2/asm/asm-tree/6.0/asm-tree-6.0.jar, /home/kwangho/.m2/repository/org/ow2/asm/asm-analysis/6.0/asm-analysis-6.0.jar, /home/kwangho/.m2/repository/org/ow2/asm/asm-util/6.0/asm-util-6.0.jar, /home/kwangho/.m2/repository/commons-cli/commons-cli/1.4/commons-cli-1.4.jar, /home/kwangho/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar, /home/kwangho/.m2/repository/fil/iagl/cocospoon/CocoSpoon/1.0.0-SNAPSHOT/CocoSpoon-1.0.0-SNAPSHOT.jar, /home/kwangho/.m2/repository/org/easytesting/fest-assert/1.4/fest-assert-1.4.jar, /home/kwangho/.m2/repository/org/easytesting/fest-util/1.1.6/fest-util-1.1.6.jar, /home/kwangho/.m2/repository/com/google/code/gson/gson/2.8.2/gson-2.8.2.jar, target/classes, /home/kwangho/workspace/astor/./output_astor/AstorMain-Math-issue-280//bin//default]

17:31:54.805 [main] ERROR AstorCoreEngine - [warning] Any modification point in variant 17:31:54.806 [main] ERROR AstorCoreEngine - Variant with any gen 17:31:54.812 [main] ERROR AstorCoreEngine - Stopping main loop at 100 generation

martinezmatias commented 3 years ago

Hi @KwanghoKim

Thanks for your interest on Astor. Cocospoon code is quite experimental. We haven't detailed tested that mode. However, we are currently working on a new fault localization approach that we are integrating to Astor. In few weeks, it will be ready to be used. Thanks

Matias

KwanghoKim commented 3 years ago

Thank you so much for your speedy response..!

Can I ask one more? How can I check correctness after test? (Is there on output folder? I couldn't find in json file.)

2021년 8월 18일 (수) 오후 6:30, Matias Martinez @.***>님이 작성:

Closed #332 https://github.com/SpoonLabs/astor/issues/332.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SpoonLabs/astor/issues/332#event-5173655567, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSUXKE7Q6H6EGIOMBIAVR3T5N4SZANCNFSM5CLRMTFA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

martinezmatias commented 3 years ago

Hi @KwanghoKim

How can I check correctness after test?

Do you mean correctness of patches? All patches generated by Astor are plausibles, and pass all test cases contained in the app under repair, but yet those can be incorrect as the test cases can be weak.

KwanghoKim commented 3 years ago

Thank you so much @martinezmatias ..!