Arguments (PsiExpression[] arguments, int argumentOffset, boolean isVarArgCall) { if (!isVarArgCall) { if (arguments.length == argumentOffset + 1) { final List<PsiExpression> expressions = getVarargs(arguments[argumentOffset]); if (expressions != null) { return new Arguments(expressions.toArray(PsiExpression.EMPTY_ARRAY), true); } } } else if (arguments.length >= argumentOffset) { final PsiExpression[] expressions = argumentOffset != 0 ? Arrays.copyOfRange(arguments, argumentOffset, arguments.length) : arguments; for (int i = 0; i < expressions.length; i++) { final PsiExpression castOperand = unwrapDisambiguatingCastToObject(expressions[i]); if (castOperand != null) { expressions[i] = castOperand; } } return new Arguments(expressions, false); } return null; }