You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of an inquiry and not necessary a bug report. I was experimenting with the tool, and I saw that the resulting patch for certain inputs is not optimal in the sense that the patch uses insertion and deletion operations instead of moves. Consider these two JSON documents describing the syntax tree of some function. The second tree has an extra statement inserted in the beginning:
I use the following code snippet to compute the patch between them:
final ObjectMapper mapper = new ObjectMapper();
final JsonNode n1 = mapper.readTree(SRC);
final JsonNode n2 = mapper.readTree(TRG);
final JsonPatch diff = JsonDiff.asJsonPatch(n1, n2);
Ideally, the shifting of the original two statements should be described with two moves and no change at all to the nodes in their subtrees. Can you please provide some insights on this scenario? Am I missing something or is the above patch the expected output?
The text was updated successfully, but these errors were encountered:
This is more of an inquiry and not necessary a bug report. I was experimenting with the tool, and I saw that the resulting patch for certain inputs is not optimal in the sense that the patch uses insertion and deletion operations instead of moves. Consider these two JSON documents describing the syntax tree of some function. The second tree has an extra statement inserted in the beginning:
I use the following code snippet to compute the patch between them:
The resulting patch is as follows:
Ideally, the shifting of the original two statements should be described with two moves and no change at all to the nodes in their subtrees. Can you please provide some insights on this scenario? Am I missing something or is the above patch the expected output?
The text was updated successfully, but these errors were encountered: