List<ClusterOfUsages> (@NotNull Map<PsiExpression, ClusterOfUsages> usagesMap, @NotNull Match match) { List<ClusterOfUsages> result = new ArrayList<>(); List<ExtractedParameter> parameters = match.getExtractedParameters(); for (ExtractedParameter parameter : parameters) { ClusterOfUsages usages = usagesMap.get(parameter.myPattern.getUsage()); if (usages != null && !usages.arePatternsEquivalent(parameter) || usages == null && ClusterOfUsages.isPatternPresent(usagesMap, parameter)) { return null; } if (usages == null) { result.add(usages = new ClusterOfUsages(parameter)); } usages.putParameter(match, parameter); } return result; }