private int[] getTokenOffsets() {
    int[] offsets = tokenOffsets;
    if (offsets == null) {
      tokenOffsets = offsets = calcTokenOffsets();
    }
    return offsets;
  }
private int[] getTokenOffsets()