private @Nullable AnalysisStartingPoint getAnalysis(@NotNull PsiElement anchor,
                                                      @NotNull ExceptionInfo info) {
    if (anchor instanceof PsiKeyword && anchor.textMatches(PsiKeyword.NEW)) {
      PsiNewExpression exceptionConstructor = tryCast(anchor.getParent(), PsiNewExpression.class);
      if (exceptionConstructor != null && !exceptionConstructor.isArrayCreation()) {
        PsiThrowStatement throwStatement =
          tryCast(ExpressionUtils.getTopLevelExpression(exceptionConstructor).getParent(), PsiThrowStatement.class);
        if (throwStatement == null) return null;
        return fromThrowStatement(throwStatement);
      }
    }
    if (info instanceof AssertionErrorInfo) {
      return fromAssertionError(anchor);
    }
    else if (info instanceof ArrayIndexOutOfBoundsExceptionInfo) {
      Integer index = ((ArrayIndexOutOfBoundsExceptionInfo)info).getIndex();
      if (index != null && anchor instanceof PsiExpression) {
        return AnalysisStartingPoint.create(DfTypes.intValue(index), (PsiExpression)anchor);
      }
    }
    else if (info instanceof ClassCastExceptionInfo) {
      return fromClassCastException(anchor, ((ClassCastExceptionInfo)info).getActualClass());
    }
    else if (info instanceof NullPointerExceptionInfo || info instanceof JetBrainsNotNullInstrumentationExceptionInfo) {
      return AnalysisStartingPoint.create(DfTypes.NULL, tryCast(anchor, PsiExpression.class));
    }
    else if (info instanceof NegativeArraySizeExceptionInfo) {
      Integer size = ((NegativeArraySizeExceptionInfo)info).getSuppliedSize();
      if (size != null && size < 0 && anchor instanceof PsiExpression) {
        return AnalysisStartingPoint.create(DfTypes.intValue(size), (PsiExpression)anchor);
      }
    }
    else if (info instanceof ArithmeticExceptionInfo) {
      return fromArithmeticException(anchor);
    }
    else if (info instanceof ArrayCopyIndexOutOfBoundsExceptionInfo) {
      if (anchor instanceof PsiExpression) {
        return AnalysisStartingPoint.create(DfTypes.intValue(((ArrayCopyIndexOutOfBoundsExceptionInfo)info).getValue()), (PsiExpression)anchor);
      }
    }
    return null;
  }
private @Nullable AnalysisStartingPoint getAnalysis(@NotNull PsiElement anchor,
                                                      @NotNull ExceptionInfo info)