public boolean isPrefixOf(ArgPosition otherArgPosition) {
    if (otherArgPosition == null || otherArgPosition.depth() < depth()) {
      return false;
    } else {
      return path.equals(otherArgPosition.getPath().subList(0, path.size()));
    }
  }