private static ExceptionLineRefiner.RefinerMatchResult fromUnboxing(PsiElement e, @Nullable PsiPrimitiveType type) {
    PsiExpression boxedExpression = null;
    if (e instanceof PsiIdentifier) {
      PsiReferenceExpression ref = tryCast(e.getParent(), PsiReferenceExpression.class);
      if (ref != null) {
        boxedExpression = ref.getParent() instanceof PsiMethodCallExpression ? ((PsiMethodCallExpression)ref.getParent()) : ref;
      }
    }
    if (e instanceof PsiJavaToken) {
      IElementType tokenType = ((PsiJavaToken)e).getTokenType();
      if (tokenType.equals(JavaTokenType.RBRACKET)) {
        PsiArrayAccessExpression arrayAccess = tryCast(e.getParent(), PsiArrayAccessExpression.class);
        if (arrayAccess != null) {
          boxedExpression = arrayAccess;
        }
      }
    }
    if (boxedExpression != null) {
      PsiType expressionType = boxedExpression.getType();
      PsiPrimitiveType unboxedType = PsiPrimitiveType.getUnboxedType(expressionType);
      if (unboxedType != null && (type == null || unboxedType.equals(type))) {
        return onTheSameLineFor(e, boxedExpression, false);
      }
    }
    return null;
  }
private static ExceptionLineRefiner.RefinerMatchResult fromUnboxing(PsiElement e, @Nullable PsiPrimitiveType type)