ThrowableNotThrownFix (PsiCallExpression context) { final PsiElement parent = context.getParent(); if (!(parent instanceof PsiExpressionStatement)) { return null; } final PsiElement next = PsiTreeUtil.getNextSiblingOfType(parent, PsiStatement.class); return next == null ? new ThrowableNotThrownFix() : null; }