The Gerrit diff bug you observed here appears to be fixed in 2.1.2 final release.  We tweaked the heuristics quite a bit between when you first reviewed the code, and now when I'm looking through it again to address comments.