void (@NotNull PsiMethod constructor, @NotNull Map<PsiField, String> usedFields) { int index = 0; PsiExpressionList argumentList = methodCall.getArgumentList(); PsiExpression[] args = argumentList.getExpressions(); PsiElementFactory factory = JavaPsiFacade.getElementFactory(constructor.getProject()); for (PsiVariable variable : thisCallVariables) { if (variable instanceof PsiParameter) { index++; } else if (variable instanceof PsiField field) { String parameterName = usedFields.get(field); PsiExpression arg = factory.createExpressionFromText(parameterName, constructor); argumentList.addAfter(arg, index == 0 ? null : args[index - 1]); } } }