private int getSkipCorrectedReference ( List < Integer > tokenPositions , int refNumber ) { int correctedRef = 0 ; int i = 0 ; for ( int tokenPosition : tokenPositions ) { if ( i ++ >= refNumber ) { break ; } correctedRef += tokenPosition ; } return correctedRef - 1 ; }
when there s a skip we need to adapt the reference number