DuplicatesFinder () { DuplicatesFinder finder = null; PsiElement[] elements = getFilteredElements(); if (myExpression != null) { finder = new DuplicatesFinder(elements, myInputVariables.copy(), Collections.emptyList()); } else if (elements.length != 0) { finder = new DuplicatesFinder(elements, myInputVariables.copy(), myOutputVariable != null ? new VariableReturnValue(myOutputVariable) : null, Arrays.asList(myOutputVariables)); } return finder; }