question: private void addPattern ( Entity a , Entity b , List < PatternExtract > patterns ) { if ( a . getEnd ( ) < b . getBegin ( ) ) { patterns . add ( new PatternExtract ( a , b , a . getEnd ( ) , b . getBegin ( ) ) ) ; } else if ( a . getBegin ( ) > b . getEnd ( ) ) { patterns . add ( new PatternExtract ( b , a , b . getEnd ( ) , a . getBegin ( ) ) ) ; } else { } }
target:  Create and add the pattern, or do nothing if the entities overlap