String (IntroduceParameterObjectClassDescriptor descriptor, final List<? extends ParameterInfo> oldMethodParameters, final PsiElement[] args) { final StringBuilder newExpression = new StringBuilder(); final ParameterInfo[] paramsToMerge = descriptor.getParamsToMerge(); newExpression.append(StringUtil.join(paramsToMerge, parameterInfo -> getArgument(args, parameterInfo.getOldIndex(), oldMethodParameters), ", ")); final ParameterInfo lastParam = paramsToMerge[paramsToMerge.length - 1]; if (lastParam instanceof JavaParameterInfo && ((JavaParameterInfo)lastParam).isVarargType()) { final int lastArg = lastParam.getOldIndex(); for (int i = lastArg + 1; i < args.length; i++) { newExpression.append(','); newExpression.append(getArgument(args, i, oldMethodParameters)); } } return newExpression.toString(); }