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

Nway throws a null pointer exception every time #18

Open
mausotog opened this issue Jan 23, 2019 · 0 comments
Open

Nway throws a null pointer exception every time #18

mausotog opened this issue Jan 23, 2019 · 0 comments

Comments

@mausotog
Copy link

Hi, I am trying to run the nway mode, but everytime I run it with any code it shows a null pointer exception.
As a minimal example I created 3 classes. Class1.java contains the following code.
public class Class1{
public int method1(){
return 1;
}
}
Class2.java and Class3.java are similar but returning values "2" and "3" accordingly.

I tried to use JDime to merge them using the following command:
../jdime//build/install/JDime/bin/JDime --mode nway -f --output ClassExit.java Class1.java Class2.java Class3.java

But everytime I get an error as follows:
Logging configuration file JDimeLogging.properties does not exist. Falling back to defaults.
JDime [18:46:17] WARNING: JDime.properties can not be used as a config file as it does not exist.
JDime [18:46:17] SEVERE: Exception while merging:
JDime [18:46:17] SEVERE: A: Class1.java
JDime [18:46:17] SEVERE: B: Class2.java
JDime [18:46:17] SEVERE: C: Class3.java
JDime [18:46:17] SEVERE: java.lang.NullPointerException
JDime [18:46:17] SEVERE: Uncaught exception.
java.lang.Error: java.lang.NullPointerException
at de.fosd.jdime.strategy.NWayStrategy.merge(NWayStrategy.java:149)
at de.fosd.jdime.artifact.file.FileArtifact.merge(FileArtifact.java:647)
at de.fosd.jdime.operations.MergeOperation.apply(MergeOperation.java:166)
at de.fosd.jdime.Main.merge(Main.java:446)
at de.fosd.jdime.Main.run(Main.java:156)
at de.fosd.jdime.Main.main(Main.java:113)
Caused by: java.lang.NullPointerException
at de.fosd.jdime.merge.Merge.merge(Merge.java:73)
at de.fosd.jdime.artifact.ast.ASTNodeArtifact.merge(ASTNodeArtifact.java:471)
at de.fosd.jdime.operations.MergeOperation.apply(MergeOperation.java:166)
at de.fosd.jdime.strategy.NWayStrategy.merge(NWayStrategy.java:109)
... 5 more

I have also tried with 4 classes. Same error.
This error does not happen with Linebased or Structured modes.

Thanks in advance for the help.

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

1 participant