UsageInfo[] (PsiElement element, UsageInfo[] usages) { final ArrayList<UsageInfo> extractedUsages = new ArrayList<>(usages.length); for (UsageInfo usage : usages) { if (usage instanceof MoveRenameUsageInfo usageInfo) { if (element.equals(usageInfo.getReferencedElement())) { extractedUsages.add(usageInfo); } } } return extractedUsages.toArray(UsageInfo.EMPTY_ARRAY); }