code: private void expandActivePath(int size) {
      if (activePath.length < size) {
        final int p = activePath.length;
        activePath = java.util.Arrays.copyOf(activePath, size);
        nextArcOffset = java.util.Arrays.copyOf(nextArcOffset, size);
  
        for (int i = p; i < size; i++) {
          nextArcOffset[i] = activePath[i] = allocateState(/* assume max labels count */MAX_LABELS);
        }
      }
    }
docs: Append a new mutable state to the active path.