When researching for an answer to this question, besides a variant over using SemanticMerge as my suggested answer for "Diff tool for XML Files", I found another tool which claims to be context aware for a few programming languages: Compare++, which brags about the following:
Compared with other file comparison tools, the great process made in Compare++ is using language-aware structured comparison engine with two comparison modes ("Code-oriented" and "Text-oriented") to compare source files. Through completely understanding of code structures, you can get more precise code comparison results and abundant post-comparison features.
In order to help you review code structure changes, a dockable pane "Function View" is provided, in which all structure such as function, class or namespace changes(modified, removed or added) are listed.
- It can NOT ONLY compare the file content, but also display and report all function, classes, namespace changes in a side-by-side Function View.
- In the Function View, you can customize filter mode to only display modified functions.
The program is not freeware (USD 29.95/user), but you can try it without a license for 30 days.
I'm not sure if it actually suggests that code is moved, or if that requires some manual labour, but it does claim in the functions view to be able to detect if it is modified, removed or added.
PS! On a side-note it does handle html, so possibly it can handle xml also?
PPS! Here is a tool in python to compare XML (which possibly could be changed into comparing json (if converted into an etree)). However this seems like it is written for equality checks, and doesn't provide that much visual feedback.