protected PsiSubstitutor getSubstitutor(PsiCallExpression contextCall, PsiExpression[] expressions, int i, JavaResolveResult result) {
    if (result instanceof MethodCandidateInfo) {
      List<PsiExpression> leftArgs = getExpressions(expressions, i);
      return ((MethodCandidateInfo)result).inferSubstitutorFromArgs(this, leftArgs.toArray(PsiExpression.EMPTY_ARRAY));
    }
    else {
      return result.getSubstitutor();
    }
  }
protected PsiSubstitutor getSubstitutor(PsiCallExpression contextCall, PsiExpression[] expressions, int i, JavaResolveResult result)