@NotNull
  private static Map<String, List<PsiElement>> processReferences(@NotNull List<? extends PsiElement> references,
                                                                 @NotNull ComponentContext context) {
    Map<String, List<PsiElement>> result = new HashMap<>();
    for (PsiElement reference : references) {
      PsiElement element = PsiUtil.skipParenthesizedExprUp(reference.getParent());
      if (element == null) {
        return Map.of();
      }
      if (!(element instanceof PsiReferenceExpression componentReferenceExpression)) {
        return Map.of();
      }
      PsiElement resolvedReferenceExpression = componentReferenceExpression.resolve();
      PsiRecordComponent component;
      if (resolvedReferenceExpression instanceof PsiMethod recordMethod && !recordMethod.isPhysical()) {
        component = JavaPsiRecordUtil.getRecordComponentForAccessor(recordMethod);
      }
      else if (resolvedReferenceExpression instanceof PsiField field && !field.isPhysical()) {
        component = JavaPsiRecordUtil.getComponentForField(field);
      }
      else {
        return Map.of();
      }
      if (component == null) {
        return Map.of();
      }
      PsiType substituted = context.classSubstitutor.substitute(component.getType());
      if (substituted == null || substituted instanceof PsiWildcardType || substituted instanceof PsiCapturedWildcardType) {
        return Map.of();
      }

      List<PsiElement> expressions = result.get(component.getName());
      PsiElement normalizedElement = normalizeElement(componentReferenceExpression, component, context);
      if (expressions == null) {
        List<PsiElement> referenceExpressions = new ArrayList<>();
        referenceExpressions.add(normalizedElement);
        result.put(component.getName(), referenceExpressions);
      }
      else {
        expressions.add(normalizedElement);
      }
    }
    return result;
  }
@NotNull
  private static Map<String, List<PsiElement>> processReferences(@NotNull List<? extends PsiElement> references,
                                                                 @NotNull ComponentContext context)