int () { PsiElement[] elements = getFilteredElements(); ReturnValue value; List<PsiVariable> parameters; if (myExpression != null) { value = null; parameters = Collections.emptyList(); } else if (elements.length != 0) { value = myOutputVariable != null ? new VariableReturnValue(myOutputVariable) : null; parameters = Arrays.asList(myOutputVariables); } else { return 0; } DuplicatesFinder finder = new DuplicatesFinder(elements, myInputVariables.copy(), value, parameters); List<Match> myDuplicates = finder.findDuplicates(myTargetClass); if (!ContainerUtil.isEmpty(myDuplicates)) return myDuplicates.size(); ParametrizedDuplicates parametrizedDuplicates = ParametrizedDuplicates.findDuplicates(this, MatchType.PARAMETRIZED, null); if (parametrizedDuplicates != null) { List<Match> duplicates = parametrizedDuplicates.getDuplicates(); return duplicates != null ? duplicates.size() : 0; } return 0; }