Then it hits me...instead of using a diff, if you abstracted slightly more and analyzed constructs, statements, etc...as a whole instead of on a character by character (or token) basis...you might be able to locate code fragments which are not just syntactically similar...but semantically as well...
Obviously the above duplicate code would be pointless to refactor, but I am sure in complex codebases you could find code which could be extracted and refactored...if($a == 'SomeDude')
if($someVar == 'SomeDude')
Any articles on the subject, etc???
Not looking for the first 5 tools you can find on google eh...
Cheers