public void removeParametersUsedInExitsOnly(@NotNull PsiElement codeFragment,
                                              @NotNull Collection<? extends PsiStatement> exitStatements,
                                              @NotNull ControlFlow controlFlow,
                                              int startOffset,
                                              int endOffset) {
    final LocalSearchScope scope = new LocalSearchScope(codeFragment);
    Variables:
    for (Iterator<VariableData> iterator = myInputVariables.iterator(); iterator.hasNext();) {
      final VariableData data = iterator.next();
      for (PsiReference ref : ReferencesSearch.search(data.variable, scope)) {
        PsiElement element = ref.getElement();
        int elementOffset = controlFlow.getStartOffset(element);
        if (elementOffset >= startOffset && elementOffset <= endOffset) {
          if (!isInExitStatements(element, exitStatements)) continue Variables;
        }
      }
      iterator.remove();
    }
  }
public void removeParametersUsedInExitsOnly(@NotNull PsiElement codeFragment,
                                              @NotNull Collection<? extends PsiStatement> exitStatements,
                                              @NotNull ControlFlow controlFlow,
                                              int startOffset,
                                              int endOffset)