boolean (PsiCodeBlock body, PsiParameter parameter) { if (ControlFlowUtils.isEmptyCodeBlock(body)) { return true; // incomplete code } final PsiStatement statement = ControlFlowUtils.getOnlyStatementInBlock(body); if (statement == null) { return false; } if (!(statement instanceof PsiReturnStatement returnStatement)) { return true; // incomplete code } final PsiExpression returnValue = returnStatement.getReturnValue(); final Object constant = ExpressionUtils.computeConstantExpression(returnValue); if (Boolean.FALSE.equals(constant)) { return true; // incomplete code } if (REFLECTION_EQUALS.matches(returnValue)) { return true; } if (isIdentityEquals(returnValue, parameter)) { return true; } return false; }