@NotNull
    private static Map<String, List<String>> deleteVariablesAndMapToMethodCalls(@NotNull Map<String, List<PsiElement>> map,
                                                                                @NotNull ComponentContext context) {
      PsiParameter currentElement = context.currentParameter;
      String name = currentElement.getName();
      HashMap<String, List<String>> usedNames = new HashMap<>();
      for (Map.Entry<String, List<PsiElement>> componentReferences : map.entrySet()) {
        String method = name + "." + componentReferences.getKey() + "()";
        PsiElementFactory factory = PsiElementFactory.getInstance(currentElement.getProject());
        List<PsiElement> newElements = new ArrayList<>();
        for (PsiElement element : componentReferences.getValue()) {
          if (element instanceof PsiReferenceExpression referenceExpression && referenceExpression.resolve() instanceof PsiField) {
            CommentTracker tracker = new CommentTracker();
            newElements.add(PsiReplacementUtil.replaceExpressionAndShorten(referenceExpression, method, tracker));
            continue;
          }
          if (element instanceof PsiVariable currentVariable) {
            List<PsiReferenceExpression> references = VariableAccessUtils.getVariableReferences(currentVariable, context.base.getBody());
            for (PsiReferenceExpression reference : references) {
              PsiExpression newMethod = factory.createExpressionFromText(method, reference);
              PsiElement replacedElement = reference.replace(newMethod);
              newElements.add(replacedElement);
            }
            String variableName = currentVariable.getName();
            List<String> previousNames = usedNames.get(componentReferences.getKey());
            if (previousNames == null) {
              ArrayList<String> newNames = new ArrayList<>();
              newNames.add(variableName);
              usedNames.put(componentReferences.getKey(), newNames);
            }
            else {
              previousNames.add(variableName);
            }
            CommentTracker tracker = new CommentTracker();
            tracker.deleteAndRestoreComments(currentVariable);
          }
          else {
            newElements.add(element);
          }
        }
        componentReferences.getValue().clear();
        componentReferences.getValue().addAll(newElements);
      }
      return usedNames;
    }
@NotNull
    private static Map<String, List<String>> deleteVariablesAndMapToMethodCalls(@NotNull Map<String, List<PsiElement>> map,
                                                                                @NotNull ComponentContext context)