private static int[] calculatePermutation(PsiMethodCallExpression call, PsiParameterList parameterList) {
    final PsiExpressionList argumentList = call.getArgumentList();
    final PsiExpression[] args = argumentList.getExpressions();
    final int[] out = ArrayUtil.newIntArray(args.length);
    for (int i = 0; i < args.length; i++) {
      final PsiExpression arg = args[i];
      final PsiParameter parameter = (PsiParameter)((PsiReference)arg).resolve();
      out[i] = parameterList.getParameterIndex(parameter);
    }
    return out;
  }
private static int[] calculatePermutation(PsiMethodCallExpression call, PsiParameterList parameterList)