Adding an "uppercase letter boundary" to semantic cleanup score will make code
diffs look nicer.
For example,
cleanupS<ins>emanticS</ins>core
would be changed to
cleanup<ins>Semantic</ins>Score
This might be useful in regular texts too (e.g. with people's names -
M[cM]illan => [Mc]Millan)
The change seems to be easy and straightforward:
private int diff_cleanupSemanticScore(String one, String two) {
...
boolean uppercase1 = Character.isUpperCase(char1);
boolean uppercase2 = Character.isUpperCase(char2);
...
else if (!uppercase1 && uppercase2) {
// One point for upper case.
return 1;
}
return 0;
}
Original issue reported on code.google.com by 2sa...@gmail.com on 13 Jun 2012 at 5:00
Original issue reported on code.google.com by
2sa...@gmail.com
on 13 Jun 2012 at 5:00