private boolean isValid(@NotNull CharSequence text) {
    for (TextRange occurrence : myOccurrences) {
      if (!StringUtil.startsWith(text, occurrence.getStartOffset(), myOldName)) {
        return false;
      }
    }
    return true;
  }
private boolean isValid(@NotNull CharSequence text)