public static boolean areOverlapping ( TermOccurrence a , TermOccurrence b ) { return a . getSourceDocument ( ) . equals ( b . getSourceDocument ( ) ) && areOffsetsOverlapping ( a , b ) ; }
Returns true if two occurrences are in the same document and their offsets overlap .