private static @Nullable PsiType getDefaultType(final @NotNull PsiMethod method, final PsiSubstitutor substitutor, final @NotNull PsiType parameterType,
                                                    final @NotNull PsiExpression argument, @Nullable PsiExpression @NotNull [] args, int index) {
      final PsiClass containingClass = method.getContainingClass();
      if (containingClass == null) return parameterType;

      PsiType hardcoded = HardcodedDefaultTypesKt.getDefaultType(method, substitutor, index, argument);
      if (hardcoded != null) return hardcoded;

      final PsiElementFactory factory = JavaPsiFacade.getElementFactory(containingClass.getProject());
      PsiMethodCallExpression call = ObjectUtils.tryCast(argument.getParent().getParent(), PsiMethodCallExpression.class);
      AssertHint assertHint = AssertHint.createAssertEqualsLikeHintForCompletion(call, args, method, index);
      if (assertHint != null) {
        PsiExpression other = assertHint.getOtherExpression(argument);
        if (other != null) {
          ExpectedTypeInfo info = getEqualsType(other);
          if (info != null && parameterType.isAssignableFrom(info.getDefaultType())) {
            return info.getDefaultType();
          }
        }
      }
      String className = containingClass.getName();
      if (className != null && className.startsWith("Log")) {
        if (parameterType instanceof PsiClassType) {
          PsiType typeArg = PsiUtil.substituteTypeParameter(parameterType, CommonClassNames.JAVA_LANG_CLASS, 0, true);
          if (typeArg instanceof PsiWildcardType && !((PsiWildcardType)typeArg).isBounded() ||
              typeArg != null && TypeConversionUtil.erasure(typeArg).equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
            PsiClass placeClass = PsiTreeUtil.getContextOfType(argument, PsiClass.class);
            PsiClass classClass = ((PsiClassType)parameterType).resolve();
            if (placeClass != null && classClass != null && classClass.getTypeParameters().length == 1) {
              return factory.createType(classClass, factory.createType(placeClass));
            }
          }
        }
      }
      return parameterType;
    }
private static @Nullable PsiType getDefaultType(final @NotNull PsiMethod method, final PsiSubstitutor substitutor, final @NotNull PsiType parameterType,
                                                    final @NotNull PsiExpression argument, @Nullable PsiExpression @NotNull [] args, int index)