// Sort positionless parts after ones with a position.
long aSPos = Integer.MAX_VALUE + 1L, aEPos = Integer.MAX_VALUE + 1L;
long bSPos = Integer.MAX_VALUE + 1L, bEPos = Integer.MAX_VALUE + 1L;
if (a0 instanceof FilePosition) {
FilePosition pos = (FilePosition) a0;
aSPos = pos.startCharInFile();
aEPos = pos.endCharInFile();
} else if (a0 instanceof InputSource) {
// sort file level messages before messages within file
aSPos = aEPos = -1;
}