@Override
public int compare(@Nullable SyntaxHighlightingRule left,
@Nullable SyntaxHighlightingRule right) {
int result = left.getStartPosition() - right.getStartPosition();
if (result == 0) {
<BUG>result = left.getEndPosition() - right.getEndPosition();
}</BUG>
return result;
}
});

@Override
public int compare(@Nullable SyntaxHighlightingRule left,
@Nullable SyntaxHighlightingRule right) {
int result = left.getStartPosition() - right.getStartPosition();
if (result == 0) {
result = right.getEndPosition() - left.getEndPosition();
}
return result;
}
});
