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

NPEFix not finding patches Bugs it should #24

Open
andre15silva opened this issue Dec 4, 2020 · 4 comments
Open

NPEFix not finding patches Bugs it should #24

andre15silva opened this issue Dec 4, 2020 · 4 comments

Comments

@andre15silva
Copy link
Contributor

andre15silva commented Dec 4, 2020

This is related to eclipse-repairnator/repairnator#1159

1.5 (uses fr.inria.spirals 0.7) 1.5.1 (uses fr.inria.gforge.spirals 0.7) 1.6-SNAPSHOT (master) (uses fr.inria.gforge.spirals 0.7)
collections-331 Compilation failure (unrelated to NPEFix) Compilation failure (unrelated to NPEFix) Compilation failure (unrelated to NPEFix)
collections-360 Compilation failure (unrelated to NPEFix) Compilation failure (unrelated to NPEFix) Compilation failure (unrelated to NPEFix)
felix-4960 Patch found Patch found Patch found
lang-304 Patch found Patch found JSONObject["executions"] not found.
lang-587 No diffs JSONObject["executions"] not found. JSONObject["executions"] not found.
lang-703 No diffs JSONObject["executions"] not found. JSONObject["executions"] not found.
math-290 No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
math-305 No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
math-369 No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
math-988a Has diffs Patch found Patch found
math-988b No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
math-1115 No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
math-1117 No executions JSONObject["executions"] not found. JSONObject["executions"] not found.
pdfbox_2812 Could not resolve dependencies (unrelated to NPEFix) Could not resolve dependencies (unrelated to NPEFix) Could not resolve dependencies (unrelated to NPEFix)
pdfbox_2965 Has diffs Patch found Patch found
pdfbox_2995 Has diffs Patch found Patch found
sling_4982 Has diffs Patch found Patch found

NPEFix lost functionality over time as shown in the table below (left to right, oldest to latest):

Bug ID da6f155 60298ca d9b38d0 (v0.6) 1acca99 5992d4e (fr.inria.spirals v0.7)
felix-4960 Has diffs Has diffs java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException
lang304 Has diffs Has diffs Has diffs Has diffs Has diffs (but different)
lang587 Has diffs No diffs No diffs No diffs No diffs
lang703 Has diffs No diffs java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException
math290 Has diffs Has diffs java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException
math305 Has diffs Has diffs Has diffs Has diffs Has diffs (but different)
math369 Has diffs Has diffs Has diffs Has diffs Has diffs (but different)
pdfbox-2965 Has diffs Has diffs Has diffs Has diffs Has diffs (but different)
pdfbox-2995 Has diffs Has diffs (but different result) Has diffs (but different result) Has diffs (but different^2 result) Has diffs (but different^3 result)
sling-4982 Has diffs Has diffs Has diffs Has diffs Has diffs (but different)

To replicate configure the location of the dataset in src/main/resources/config.ini and run:

$ git checkout <commit-id>
$ mvn clean compile
$ mvn clean compile assembly:single
$ java -jar target/npefix-<version>-jar-with-dependencies.jar -p <bug-id>

My analysis:

  • There are several bugs, introduced over time, that were/are affecting the outputs.
  • I believe the executions bug in maven-repair is caused by the java.lang.reflect.InvocationTargetException exception.
  • There might be a couple more bugs in the middle of all the changes

This analysis is WIP, I'll continue digging tomorrow and try to fix the exception bug.

@andre15silva
Copy link
Contributor Author

andre15silva commented Dec 6, 2020

I'm not being able to run the new version of NPEFix through the command line.

❯ java -jar target/npefix-0.8-SNAPSHOT-jar-with-dependencies.jar -c /home/andre/Repos/repairnator/npe-dataset/lang-703/target/test-classes/:/home/andre/Repos/repairnator/npe-dataset/lang-703/target/classes/:/home/andre/.m2/repository/junit/junit/4.7/junit-4.7.jar:/home/andre/.m2/repository/org/easymock/easymock/2.5.2/easymock-2.5.2.jar:/home/andre/.m2/repository/fr/inria/gforge/spirals/npefix/0.8-SNAPSHOT/npefix-0.8-SNAPSHOT.jar -t org.apache.commons.lang3.StringUtilsTest#testJoin_Objectarray -s /home/andre/Repos/repairnator
/npe-dataset/lang-703/src/main/java/org/org/apache/commons/lang3/StringUtils.java
RMI Selector (Host: localhost, Port: 10001): KO

@monperrus
Copy link
Contributor

Thanks for the progress. Would you be able to identify the culprit commit with git bisset?

@andre15silva
Copy link
Contributor Author

andre15silva commented Dec 7, 2020

That's what I was trying to do essentially, but I'm not being able to run NPEFix through the new command line.

RMI Selector is always KO

Update: that's fixed :), I'll open a PR soon

@monperrus
Copy link
Contributor

Yes, RMI was used by @tdurieux we had a lot of fun about it.

As far I remember, it's not necessary by default. So if I'm correct, there is no need to activate this selector and there must be a configuration to disable it (maybe it should be deactivated by default BTW)

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

2 participants