Skip to content

Exception in thread "main" java.lang.NullPointerException #2

Description

@mosabrezaei

Hi,

Thank you so much for sharing such great work.
I will be grateful if you can help me with the problem that I have faced.

First of all, I installed maven:

!apt-get install maven

Then I followed the instructions:

! git clone https://github.com/micheletufano/src2abs.git
cd src2abs
! mvn clean
! mvn install:install-file -Dfile="lib/javalexer.jar" -DgroupId="edu.wm.cs" -DartifactId="javalexer" -Dversion="1" -Dpackaging="jar"
! mvn package

Also, I got buggy.txt and fixed.txt files from the test directory (to check the model):

! wget https://raw.githubusercontent.com/micheletufano/NeuralCodeTranslator/master/dataset/bug-fixes/small/test/buggy.txt
! wget https://raw.githubusercontent.com/micheletufano/NeuralCodeTranslator/master/dataset/bug-fixes/small/test/fixed.txt

Then I created destination files:

f = open("output_tests_abstracted.txt","w+")
f.close() 
f = open("input_methods_abstracted.txt","w+")
f.close() 
f = open("idioms.txt","w+")
f.close() 

Finally, I entered the following command:

! java -jar src2abs-0.1-jar-with-dependencies.jar pair method buggy.txt fixed.txt input_methods_abstracted.txt output_tests_abstracted.txt idioms.txt

But unfortunately, I faced with the following error and I don't know what is the reason for that:

Exception in thread "main" java.lang.NullPointerException
	at java.base/java.nio.file.Files.provider(Files.java:101)
	at java.base/java.nio.file.Files.isDirectory(Files.java:2229)
	at edu.wm.cs.src2abs.AbstractorManager.checkParentFolderExists(AbstractorManager.java:121)
	at edu.wm.cs.src2abs.AbstractorManager.checkInputs(AbstractorManager.java:117)
	at edu.wm.cs.src2abs.AbstractorManager.abstractCodePair(AbstractorManager.java:62)
	at edu.wm.cs.src2abs.main.AbstractorMain.abstractCodePair(AbstractorMain.java:67)
	at edu.wm.cs.src2abs.main.AbstractorMain.main(AbstractorMain.java:27)

Thanks for your help in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions