@Nullable
  private static DuplicatesFinder createDuplicatesFinder(@NotNull ExtractMethodProcessor processor,
                                                         @NotNull DuplicatesFinder.MatchType matchType,
                                                         @Nullable Set<? extends TextRange> textRanges) {
    PsiElement[] elements = getFilteredElements(processor.myElements);
    if (elements.length == 0) {
      return null;
    }
    Set<PsiVariable> effectivelyLocal = processor.getEffectivelyLocalVariables();

    InputVariables inputVariables = matchType == DuplicatesFinder.MatchType.PARAMETRIZED
                                    ? processor.myInputVariables.copyWithoutFolding() : processor.myInputVariables;
    ReturnValue returnValue = processor.myOutputVariable != null ? new VariableReturnValue(processor.myOutputVariable) : null;
    return new DuplicatesFinder(elements, inputVariables, returnValue,
                                Collections.emptyList(), matchType, effectivelyLocal, textRanges);
  }
@Nullable
  private static DuplicatesFinder createDuplicatesFinder(@NotNull ExtractMethodProcessor processor,
                                                         @NotNull DuplicatesFinder.MatchType matchType,
                                                         @Nullable Set<? extends TextRange> textRanges)