boolean (List<PsiStatement> tail) { if (tail.size() != 1) return false; PsiExpressionStatement expressionStatement = tryCast(tail.get(0), PsiExpressionStatement.class); if (expressionStatement == null) return false; PsiMethodCallExpression call = tryCast(expressionStatement.getExpression(), PsiMethodCallExpression.class); return call != null; }