public void introduceParameter(PsiMethod method, PsiMethod methodToSearchFor) {
      ExpressionOccurrenceManager occurrenceManager = myExpr != null ? new ExpressionOccurrenceManager(myExpr, method, null) : null;
      PsiExpression[] occurrences;
      if (myExpr != null) {
        occurrences = occurrenceManager.findExpressionOccurrences();
      }
      else { // local variable
        occurrences = CodeInsightUtil.findReferenceExpressions(method, myLocalVar);
      }

      if (myExpr != null && AbstractInplaceIntroducer.getActiveIntroducer(myEditor) == null) {
        IntroduceVariableBase.OccurrencesInfo occurrencesInfo = new IntroduceVariableBase.OccurrencesInfo(occurrences, false);
        LinkedHashMap<IntroduceVariableBase.JavaReplaceChoice, List<PsiExpression>> occurrencesMap = occurrencesInfo.buildOccurrencesMap(myExpr);
        IntroduceVariableBase.createOccurrencesChooser(myEditor).showChooser(occurrencesMap,
                                                                             RefactoringBundle.message("replace.multiple.occurrences.found"),
                                                                             choice -> {
                                                                               PsiExpression[] selectedOccurrences = choice.filter(occurrenceManager);
                                                                               introduceParameter(method, methodToSearchFor, selectedOccurrences, choice);
                                                                             });
      }
      else {
        introduceParameter(method, methodToSearchFor, occurrences, IntroduceVariableBase.JavaReplaceChoice.ALL);
      }
    }
public void introduceParameter(PsiMethod method, PsiMethod methodToSearchFor)