-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Incorrect edit script #165
Comments
@monperrus @khaes-kth srcDiff's output for this diff. |
cool. and the Gumtree-JDT output? |
@algomaster99 Is it fair to say they all fail on this diff? |
Mergelyhttps://editor.mergely.com/Bmo5md7x/ GitHub diff viewhttps://github.com/algomaster99/diffmin-examples/pull/7/files We can claim that all of them fail, if we say the correct way to show the diff was 3 updates. |
"Fail" may be too binary. We rather want an ordering relationship: X is better than Y. Here, I'd say that scrDiff is better than gumtree-JDT for example. And that the Github diff is the best. |
Agreed. As always, there is no problem, only an "opportunity" for us to improve :) |
You're training very well 👍️
|
I agree with your opinions. |
left.java
right.java
EDIT SCRIPT
Ideally, three move operations were enough but an optimum edit script is not guaranteed but a correct one should be. The edit script produced for this case has one major problem - the second operation inserts a block into an already existing block (
if
block is already there at4
). This could be a consequence of the absence ofCtBlock
concept in spoon but I am not sure. However, if this is the case,convertToSpoon
needs to be fixed.Using this edit script in diffmin also throws an error as elaborated here. This could be an issue with the mapping as
THEN
block inelse-if
inleft.java
should have been mapped toTHEN
block inif
inright.java
. However, GumTree matchers are based on heuristics so we cannot expect the matcher to give accurate mappings every time as it is an NP-hard problem as argued by @slarse.The text was updated successfully, but these errors were encountered: