Open flozender opened 1 year ago
Correct change history:
"expectedChanges": [
{
"parentCommitId": "2160c09dd4f678c5f2f8e730945be637210b39de",
"commitId": "db55d13f5f4b641a9390076ced6b1775bcfcd6f6",
"commitTime": 1286546248,
"changeType": "introduced",
"elementFileBefore": "org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java",
"elementNameBefore": "org.eclipse.jgit/src/org.eclipse.jgit.api.PullCommand#call()$if(192-195)",
"elementFileAfter": "org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java",
"elementNameAfter": "org.eclipse.jgit/src/org.eclipse.jgit.api.PullCommand#call()$if(192-195)",
"comment": "added with method"
}
]
@flozender There are two identical statements in the method.
if (monitor.isCancelled())
throw new CanceledException(MessageFormat.format(
JGitText.get().operationCanceled,
JGitText.get().pullTaskName));
At some point, these two should have been matched incorrectly one with the other and vice-versa. But I cannot find in which commit this happened. I debugged commit-by-commit up to https://github.com/flozender/jgit/commit/770c733687d9f2f71f30822f9691427bf83b7577 but I didn't find any issue. Can you help to find this problematic commit?
@tsantalis
Yes, the problematic commit is 7668a46.
The mapping here is (leftBlock <--> rightBlock
):
if(232-235)<0544c9a> <--> if(198-201)<7668a46>
Hope this helps!
In commit
0210e0e299bed69176e0a929d0b67f3cf9fb1e37
and fileorg.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
, elementorg.eclipse.jgit/src/org.eclipse.jgit.api.PullCommand#call()$if(280-283)
was tracked.This code element is mapped to code element
org.eclipse.jgit/src/org.eclipse.jgit.api.PullCommand#call()$if(232-235)
in commitdb55d13f5f4b641a9390076ced6b1775bcfcd6f6
as the next change in history, however, it should be matched withorg.eclipse.jgit/src/org.eclipse.jgit.api.PullCommand#call()$if(192-192)
in the same commit and file.Oracle filename:
jgit-PullCommand-call-IF_STATEMENT-9.json