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

java.lang.NullPointerException at com.gzoltar.core.GZoltar.run(GZoltar.java:51) #94

Open
Kui-Liu opened this issue May 24, 2018 · 20 comments

Comments

@Kui-Liu
Copy link

Kui-Liu commented May 24, 2018

I follow the command in https://github.com/SpoonLabs/astor/blob/master/docs/getting-starting.md .

Here is my command:
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 /Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/ -dependencies examples/Math-issue-280/lib

2018-05-24 12:00:01,996 INFO main - command line arguments: [-mode jGenProg -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes/ -bintestfolder /target/test-classes/ -location /Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/ -dependencies examples/Math-issue-280/lib]
[INFO ] fr.inria.main.AbstractMain.determineSourceFolders(AbstractMain.java:806) - Source folders: [/Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/src/java]
[INFO ] fr.inria.main.AbstractMain.determineSourceFolders(AbstractMain.java:825) - Source Test folders: [/Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/src/test]
[INFO ] fr.inria.astor.core.setup.ProjectConfiguration.addLocationToClasspath(ProjectConfiguration.java:140) - Adding to classpath junit-4.4.jar
[INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:75) - -Executing Gzoltar classpath: /Users/kui.liu/eclipse-workspace/astor/./output_astor/AstorMain-Math-issue-280//bin//default from 214 classes with test cases
[INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:149) - Gzoltar fault localization: min susp value parameter: 0.1
[INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:169) - -gz-Adding classpath: [/Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/lib/, /Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/lib/junit-4.4.jar, /Users/kui.liu/eclipse-workspace/astor/./output_astor/AstorMain-Math-issue-280//bin//default]
Exception in thread "main" java.lang.NullPointerException
at com.gzoltar.core.GZoltar.run(GZoltar.java:51)
at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:196)
at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:87)
at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:49)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:1270)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:121)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:176)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:230)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:207)

@martinezmatias
Copy link
Collaborator

Hi @brucekuiliu
Have you previously compile the example at / astor/examples/Math-issue-280/ using maven?

@Kui-Liu
Copy link
Author

Kui-Liu commented May 24, 2018

Hi @martinezmatias
Yes, I compiled the example.
I thought the problem might be caused by the compatibility of GZoltar.
The exception at com.gzoltar.core.GZoltar.run(GZoltar.java:51).
I don't know how to resolve it.

Could you help me?

@martinezmatias
Copy link
Collaborator

Hi @brucekuiliu
I suspect that there is a problem with the argument "-dependencies"
You wrote a value: "examples/Math-issue-280/lib"
Could you try with an absoulute path e.g., "/Users/<>/Math-X/lib".
Moreover, check in the classpath if the astor.jar is referenced in absolute manner:
example, if you run java -jar astor.jar [..] Gzoltar can fail, but if you run java -jar /user/astor.jar Gzoltar must work

@Kui-Liu
Copy link
Author

Kui-Liu commented May 24, 2018

Hi @martinezmatias ,
It still does not work.
Here is my command:
java -cp $(cat /tmp/astor-classpath.txt):/Users/kui.liu/eclipse-workspace/astor/target/classes
fr.inria.main.evolution.AstorMain
-mode jGenProg
-srcjavafolder /src/java/
-srctestfolder /src/test/
-binjavafolder /target/classes/
-bintestfolder /target/test-classes/
-location /Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/
-dependencies /Users/kui.liu/eclipse-workspace/astor/examples/Math-issue-280/lib

@martinezmatias
Copy link
Collaborator

martinezmatias commented May 24, 2018 via email

@Kui-Liu
Copy link
Author

Kui-Liu commented May 24, 2018

Test cases are failed because of the same problem: java.lang.NullPointerException
at com.gzoltar.core.GZoltar.run(GZoltar.java:51)

I test GZoltar with JDK 1.7, the problem is gone.
If I change the JDK version to 1.8 or 1.9, the problem happens again.
I think the problem is caused by the JDK version.
Which exact JDK version are you using?

@martinezmatias
Copy link
Collaborator

I use java 8 due the code of Astor needs java 8.

@nju-grx
Copy link

nju-grx commented Jan 17, 2019

Hello, I also met this Exception.

Exception in thread "main" java.lang.NullPointerException at com.gzoltar.core.GZoltar.run(GZoltar.java:51) at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:196) at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:87) at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:49) at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:902) at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:131) at fr.inria.main.evolution.AstorMain.run(AstorMain.java:188) at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:248) at fr.inria.main.evolution.AstorMain.main(AstorMain.java:222)

when I input the follow command:
java -cp $(cat /tmp/astor-classpath.txt):target/classes fr.inria.main.evolution.AstorMain -seed 0 -mode jgenprog -srcjavafolder src/ -srctestfolder test/ -binjavafolder build/classes/ -bintestfolder build/test/ -location /home/grx/project/defects4j/Closure_1 -dependencies ./examples/libs/
Could you please give me some suggestions? @brucekuiliu @martinezmatias

@martinezmatias
Copy link
Collaborator

Hello @nju-grx

Could you check if inside the project under repair (in your example /home/grx/project/defects4j/Closure_1) there is the bin folder (that one specified -binjavafolder build/classes/ ) and there are classes there? In other words, please check if you have compiled the project under repair (using maven or the Defects4J infrastructure)

Regards
Matias

@nju-grx
Copy link

nju-grx commented Jan 21, 2019

@martinezmatias Thanks for your reply. I have compiled the project under repair and checked the folder. Furthermore, I take input as closure_1 in astor(./examples/closure_1) as follows and meet the same exception.

java -cp $(cat /tmp/astor-classpath.txt):target/classes fr.inria.main.evolution.AstorMain -seed 0 -mode jgenprog -srcjavafolder src/ -srctestfolder test/ -binjavafolder build/classes/ -bintestfolder build/test/ -location /home/grx/project/astor/examples/closure_1 -dependencies ./examples/libs

@Kaka727
Copy link

Kaka727 commented Jun 6, 2019

Hi, @martinezmatias
I met the same problem when executing astor like this:

java -cp astor-0.0.2-SNAPSHOT-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain -mode jkali -location /data/math/math_70_buggy -package org.apache.commons -jvm4testexecution /home/kaka/tool/jdk1.7.0_80/bin/ -failing org.apache.commons.math.analysis.solvers.BisectionSolverTest -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes -bintestfolder /target/test-classes -flthreshold 0.5 -stopfirst true -dependencies /home/kaka/Desktop/astor/examples/libs/junit-4.4.jar

Then I change the parameter "dependencies" to /home/kaka/Desktop/astor/examples/libs
This time the error is:
[INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:272) - Gzoltar found: 0 with susp > 0.5, we consider: 0
Exception in thread "main" java.lang.IllegalArgumentException: No suspicious gen for analyze
at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:94)
at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:50)
at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:899)
at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:125)
at fr.inria.main.evolution.AstorMain.run(AstorMain.java:179)
at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:236)
at fr.inria.main.evolution.AstorMain.main(AstorMain.java:210)

@b8ne
Copy link

b8ne commented Sep 17, 2019

Hi @martinezmatias
I was also experiencing this issue using the astor.jar method descriped in Option 1.
java -cp target/astor.jar fr.inria.main.evolution.AstorMain -mode jgenprog -srcjavafolder /src/java/ -srctestfolder /src/test/ -binjavafolder /target/classes/ -bintestfolder /target/test-classes/ -location /Users/ben/Documents/Uni/astor/examples/Math-issue-280/ -dependencies /Users/ben/Documents/Uni/astor/examples/Math-issue-280/lib

I switched to Option 2 using the classpath and the repair ran successfully.
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 /Users/ben/Documents/Uni/astor/examples/Math-issue-280/ -dependencies /Users/ben/Documents/Uni/astor/examples/Math-issue-280/lib

Not sure if this helps.

@WuYff
Copy link
Contributor

WuYff commented Nov 22, 2019

I met this error today and I solved it by do the following things:

What I did is to run the install command under /astor/lib/gzoltar. The install command is provided in the directory and it is "mvn install:install-file -Dfile=lib/gzoltar/com.gzoltar-0.0.3.jar -DgroupId=com.gzoltar -DartifactId=gzoltar -Dversion=0.0.3 -Dpackaging=jar"

Next, I moved this directory /astor/lib/gzoltar into the /astor/examples/Math-issue-280/lib and run the install command.

Then I recompile the Astor and the Math-issue-280.

Then I run the command and it works successfully.

This my command :
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/eve/Documents/Astor/astor/examples/Math-issue-280/ -dependencies /home/eve/Documents/Astor/astor/examples/Math-issue-280/lib

Hope this could help.

@martinezmatias
Copy link
Collaborator

Hi @WuYff

Thanks a lot for the info.

It would be amazing if you can do a PR that updates the docs explaining "if you have a NP with GZoltar [...]"

Thanks
Best regards
Matias

@jose
Copy link
Contributor

jose commented Feb 27, 2020

Dear @WuYff and @martinezmatias,

I failed to see how the instructions proposed in PR #209 could address the null pointer exception, which by the way I'm also getting (a lot). Why would anyone need to (manually) install com.gzoltar-0.0.3.jar in the local .m2 if Astor uses 0.1.1?

Please find below a step-by-step on how to reproduce the null pointer exception in a real bug.

$ mkdir /tmp/debug_pr_209_and_issue_94

# Get Astor
$ cd /tmp/debug_pr_209_and_issue_94/astor
$ git clone https://github.com/SpoonLabs/astor.git
$ cd astor
$ git checkout 8581b1c686103352e7f6189f54437ea1e46f0c36    # latest commit as of 27/Fev/2020
$ mvn -Dmaven.repo.local=.m2 -DskipTests -DskipUTs=true -DskipITs=true package

# Get Bears benchmark
$ cd /tmp/debug_pr_209_and_issue_94
$ git clone https://github.com/bears-bugs/bears-benchmark.git

# Get 2018swecapstone-h2ms::363210218-363627522 bug
$ cd /tmp/debug_pr_209_and_issue_94/bears-benchmark
$ git checkout 6616eba1b77647d6ac1740e79931b71e580b4780    # buggy version of 2018swecapstone-h2ms::363210218-363627522
$ mvn -Dmaven.repo.local=.m2 install -DskipTests -DskipUTs=true -DskipITs=true \
    -V -B -U -Dhttps.protocols=TLSv1.2 \
    -Denforcer.skip=true \
    -Dcheckstyle.skip=true \
    -Dcobertura.skip=true \
    -Djacoco.skip=true \
    -Drat.skip=true \
    -Drat.ignoreErrors=true \
    -Drat.numUnapprovedLicenses=1000000 \
    -Dlicense.skip=true \
    -Dfindbugs.skip=true \
    -Dgpg.skip=true \
    -Dskip.npm=true \
    -Dskip.gulp=true \
    -Dskip.bower=true \
    -Dbaseline.skip=true \
    --fail-never
$ mvn -Dmaven.repo.local=.m2 dependency:build-classpath -B | egrep -v "(^\[INFO\]|^\[WARNING\])" > bug-classpath.txt

# Are there any failing test cases?
$ cd /tmp/debug_pr_209_and_issue_94/bears-benchmark
$ mvn -Dmaven.repo.local=.m2 clean test
  ...
  Results :

  Failed tests:
    UserTest.testEmailIsLowerCase:54
  Expected: is "jqadams@h2ms.org"
       but: was "JqAdAmS@h2Ms.OrG"
  Tests in error:
    UserDetailsServiceTest.testLoadUserByUsernameIsCaseInsensitive:60 » UsernameNotFound

  Tests run: 104, Failures: 1, Errors: 1, Skipped: 0

# Repair it
$ cd /tmp/debug_pr_209_and_issue_94/bears-benchmark
$ java -cp /tmp/debug_pr_209_and_issue_94/astor/target/astor-1.0.0-SNAPSHOT-jar-with-dependencies.jar fr.inria.main.evolution.AstorMain \
    -seed 0 \
    -mode jGenProg \
    -srcjavafolder src/main/java/ \
    -srctestfolder src/test/java/ \
    -binjavafolder target/classes/ \
    -bintestfolder target/test-classes/ \
    -location /tmp/debug_pr_209_and_issue_94/bears-benchmark \
    -dependencies $(cat /tmp/debug_pr_209_and_issue_94/bears-benchmark/bug-classpath.txt)

  [INFO] 15:33:22,644 fr.inria.astor.core.setup.ProjectConfiguration:282 - Version of the JVM used: 1.8.0_212
  [INFO] 15:33:22,646 main:381 - Java version of the JDK used to run tests: 1.8.0_212
  [INFO] 15:33:22,646 main:382 - The compliance of the JVM is:  8
  [INFO] 15:33:22,647 main:664 - command line arguments: [-seed  0  -mode  jGenProg  -srcjavafolder  src/main/java/  -srctestfolder  src/test/java/  -binjavafolder  target/classes/  -bintestfolder  target/test-classes/  -location  /tmp/debug_pr_209_and_issue_94/bears-benchmark  -dependencies  /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-data-rest/1.5.10.RELEASE/spring-boot-starter-data-rest-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter/1.5.10.RELEASE/spring-boot-starter-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot/1.5.10.RELEASE/spring-boot-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-autoconfigure/1.5.10.RELEASE/spring-boot-autoconfigure-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-logging/1.5.10.RELEASE/spring-boot-starter-logging-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/data/spring-data-rest-webmvc/2.6.10.RELEASE/spring-data-rest-webmvc-2.6.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/data/spring-data-rest-core/2.6.10.RELEASE/spring-data-rest-core-2.6.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/atteo/evo-inflector/1.2.2/evo-inflector-1.2.2.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-web/1.5.10.RELEASE/spring-boot-starter-web-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-tomcat/1.5.10.RELEASE/spring-boot-starter-tomcat-1.5.10.RELEASE.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-core/8.5.27/tomcat-embed-core-8.5.27.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/tomcat-annotations-api/8.5.27/tomcat-annotations-api-8.5.27.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-el/8.5.27/tomcat-embed-el-8.5.27.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.27/tomcat-embed-websocket-8.5.27.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/hibernate/hibernate-validator/5.3.6.Final/hibernate-validator-5.3.6.Final.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar:/private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/spring-web/4.3.14.RELEASE/spring-web-4.3.14.RELEASE.jar]
  [INFO] 15:33:22,650 fr.inria.main.evolution.AstorMain:206 - Running Astor on a JDK at /Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/jre
  [INFO ] fr.inria.main.AbstractMain.determineSourceFolders(AbstractMain.java:982) - Source folders: [/tmp/debug_pr_209_and_issue_94/bears-benchmark/src/main/java]
  [INFO ] fr.inria.main.AbstractMain.determineSourceFolders(AbstractMain.java:1001) - Source Test folders: [/tmp/debug_pr_209_and_issue_94/bears-benchmark/src/test/java]
  [INFO ] fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:901) - Test retrieved from classes: 9
  [INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:68) - -Executing Gzoltar classpath: /private/tmp/debug_pr_209_and_issue_94/./output_astor/AstorMain-bears-benchmark//bin//default from 9 classes with test cases
  [INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:148) - Gzoltar fault localization: min susp value parameter: 0.1
  [INFO ] fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:168) - -gz-Adding classpath: [/private/tmp/debug_pr_209_and_issue_94/./output_astor/AstorMain-bears-benchmark//bin//default, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-data-rest/1.5.10.RELEASE/spring-boot-starter-data-rest-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter/1.5.10.RELEASE/spring-boot-starter-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot/1.5.10.RELEASE/spring-boot-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-autoconfigure/1.5.10.RELEASE/spring-boot-autoconfigure-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-logging/1.5.10.RELEASE/spring-boot-starter-logging-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/ch/qos/logback/logback-classic/1.1.11/logback-classic-1.1.11.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/ch/qos/logback/logback-core/1.1.11/logback-core-1.1.11.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/jul-to-slf4j/1.7.25/jul-to-slf4j-1.7.25.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/log4j-over-slf4j/1.7.25/log4j-over-slf4j-1.7.25.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/data/spring-data-rest-webmvc/2.6.10.RELEASE/spring-data-rest-webmvc-2.6.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/data/spring-data-rest-core/2.6.10.RELEASE/spring-data-rest-core-2.6.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/atteo/evo-inflector/1.2.2/evo-inflector-1.2.2.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/slf4j/jcl-over-slf4j/1.7.25/jcl-over-slf4j-1.7.25.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-web/1.5.10.RELEASE/spring-boot-starter-web-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/boot/spring-boot-starter-tomcat/1.5.10.RELEASE/spring-boot-starter-tomcat-1.5.10.RELEASE.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-core/8.5.27/tomcat-embed-core-8.5.27.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/tomcat-annotations-api/8.5.27/tomcat-annotations-api-8.5.27.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-el/8.5.27/tomcat-embed-el-8.5.27.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/apache/tomcat/embed/tomcat-embed-websocket/8.5.27/tomcat-embed-websocket-8.5.27.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/hibernate/hibernate-validator/5.3.6.Final/hibernate-validator-5.3.6.Final.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/jboss/logging/jboss-logging/3.3.1.Final/jboss-logging-3.3.1.Final.jar, /private/tmp/debug_pr_209_and_issue_94/bears-benchmark/.m2/org/springframework/spring-web/4.3.14.RELEASE/spring-web-4.3.14.RELEASE.jar]
  Exception in thread "main" java.lang.NullPointerException
  	at com.gzoltar.core.GZoltar.run(GZoltar.java:51)
  	at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:197)
  	at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.calculateSuspicious(GZoltarFaultLocalization.java:87)
  	at fr.inria.astor.core.faultlocalization.gzoltar.GZoltarFaultLocalization.searchSuspicious(GZoltarFaultLocalization.java:42)
  	at fr.inria.astor.core.solutionsearch.AstorCoreEngine.calculateSuspicious(AstorCoreEngine.java:905)
  	at fr.inria.main.evolution.AstorMain.createEngine(AstorMain.java:115)
  	at fr.inria.main.evolution.AstorMain.run(AstorMain.java:169)
  	at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:229)
  	at fr.inria.main.evolution.AstorMain.main(AstorMain.java:200)

@martinezmatias
Copy link
Collaborator

Hi @jose
Which JVM version are you using? I found a lot of NPE of GZoltar using a JVM greater than 8.

@jose
Copy link
Contributor

jose commented Mar 5, 2020

Hi @martinezmatias,

I'm sorry, completely forgot to mention that. I'm currently using Oracle JDK 8u181-b13.

--
Best
Jose

@martinezmatias
Copy link
Collaborator

martinezmatias commented Mar 5, 2020

Hi @jose

Oracle JDK 8u181-b13.

Thanks for the info. I will check. I have recently found lot of NPE of Gzoltar and it's really hard to know what is happening.

We would like to use another version. As we dont have the code of Gzoltar 0.1.1, Do you think it could be possible to integrate a later version of Gzoltar (i.e., that one from Gitthub)? WDYT?

@jose
Copy link
Contributor

jose commented Mar 5, 2020

Do you think it could be possible to integrate a later version of Gzoltar (i.e., that one from Gitthub)? WDYT?

Yes, please, and I will be happy to help you with that. But first, I will have to know more details on how Astor does use GZoltar.

--
Best,
Jose

@martinezmatias
Copy link
Collaborator

Hi Jose,

Perfect.

Astor propose an interface (here) that represents a fault localization approach. Thus, we can extend Astor with implementations of that interfaces.
One implementation is this one, which calls GZoltar 0.1.1. This implementation is used by default by any approach.
Then, there are other implementations, which we have not well tested, such as CoCoSpoon or GZoltar 1.7

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

7 participants