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

NullPointerException when running AstorMain.execute(args) #238

Closed javierron closed 4 years ago

javierron commented 4 years ago

I have traced the issue and it seems that the location configuration property is being required here: https://github.com/SpoonLabs/astor/blob/352355e4e9f335427a75cd78303e3d37064802c6/src/main/java/fr/inria/main/AbstractMain.java#L378

https://github.com/SpoonLabs/astor/blob/352355e4e9f335427a75cd78303e3d37064802c6/src/main/java/fr/inria/astor/core/setup/ProjectConfiguration.java#L274

Before being stored in the properties map here:

https://github.com/SpoonLabs/astor/blob/352355e4e9f335427a75cd78303e3d37064802c6/src/main/java/fr/inria/main/AbstractMain.java#L396

It might be related to: https://github.com/SpoonLabs/astor/issues/236

martinezmatias commented 4 years ago

Hi @javierron Do you have the command you use to launch Astor? Thanks Matias

javierron commented 4 years ago

Sure, you can see the call here:

https://github.com/eclipse/repairnator/blob/4fc54a2194a6def3785ea1a51a3bfb9efb2e68fc/src/repairnator-pipeline/src/main/java/fr/inria/spirals/repairnator/process/step/repair/sequencer/detection/AstorDetectionStrategy.java#L52

This worked on version 20190919, but breaks in version 1.0.0-SNAPSHOT after I upgraded to get the fix for the GZoltar exception.

martinezmatias commented 4 years ago

Hi Javier Do you have the stack trace of the NPE? Thanks! Regards Matias

javierron commented 4 years ago

Hello

I am getting this in the log:

Error retrieving java version: java.lang.NullPointerException
Error retrieving java version output obtained: 

And then stack trace

java.lang.NullPointerException: null
    at java.io.File.<init>(File.java:277)
    at fr.inria.main.AbstractMain.processArguments(AbstractMain.java:422)
    at fr.inria.main.evolution.AstorMain.execute(AstorMain.java:214)
    at fr.inria.spirals.repairnator.process.step.repair.sequencer.detection.AstorDetectionStrategy.detect(AstorDetectionStrategy.java:52)
...