private void createCodeMappings(MtasTokenIdFactory mtasTokenIdFactory,
      Level level, String stringValue, int offsetStart, int offsetEnd,
      int realOffsetStart, int realOffsetEnd, List<Integer> codePositions)
      throws IOException {
    String[] stringValues = MtasPennTreebankReader.createStrings(stringValue,
        Pattern.quote(STRING_SPLITTER));
    MtasToken token = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
        level.node, filterString(stringValues[0].trim()));
    token.setOffset(offsetStart, offsetEnd);
    token.setRealOffset(realOffsetStart, realOffsetEnd);
    token.addPositions(codePositions.stream().mapToInt(i -> i).toArray());
    tokenCollection.add(token);
    level.tokens.add(token);
  }
private void createCodeMappings ( MtasTokenIdFactory mtasTokenIdFactory , Level level , String stringValue , int offsetStart , int offsetEnd , int realOffsetStart , int realOffsetEnd , List < Integer > codePositions ) throws IOException { String [ ] stringValues = MtasPennTreebankReader . createStrings ( stringValue , Pattern . quote ( STRING_SPLITTER ) ) ; MtasToken token = new MtasTokenString ( mtasTokenIdFactory . createTokenId ( ) , level . node , filterString ( stringValues [ 0 ] . trim ( ) ) ) ; token . setOffset ( offsetStart , offsetEnd ) ; token . setRealOffset ( realOffsetStart , realOffsetEnd ) ; token . addPositions ( codePositions . stream ( ) . mapToInt ( i -> i ) . toArray ( ) ) ; tokenCollection . add ( token ) ; level . tokens . add ( token ) ; }
Creates the code mappings.

@param mtasTokenIdFactory
the mtas token id factory
@param level
the level
@param stringValue
the string value
@param offsetStart
the offset start
@param offsetEnd
the offset end
@param realOffsetStart
the real offset start
@param realOffsetEnd
the real offset end
@param codePositions
the code positions
@throws IOException
Signals that an I/O exception has occurred.