void (PsiElement codeFragment, List<PsiVariable> inputVariables) { LocalSearchScope scope = new LocalSearchScope(codeFragment); Variables: for (Iterator<PsiVariable> iterator = inputVariables.iterator(); iterator.hasNext();) { PsiVariable variable = iterator.next(); for (PsiReference ref : ReferencesSearch.search(variable, scope)) { PsiElement element = ref.getElement(); int elementOffset = myControlFlow.getStartOffset(element); if (elementOffset == -1) { continue Variables; } if (elementOffset >= myFlowStart && elementOffset <= myFlowEnd) { if (!isInExitStatements(element, myExitStatements)) continue Variables; } } iterator.remove(); } }