private static @Nullable String getNameToReplace(final Document document, @NotNull Couple<RangeMarker> markers) {
      final RangeMarker leader = markers.first;
      final RangeMarker support = markers.second;
      if (document.getTextLength() < leader.getEndOffset()) {
        return null;
      }
      final String name = document.getText(leader.getTextRange());
      if (document.getTextLength() >= support.getEndOffset() &&
          !name.equals(document.getText(support.getTextRange()))) {
        return name;
      }
      return null;
    }
private static @Nullable String getNameToReplace(final Document document, @NotNull Couple<RangeMarker> markers)