if (ExpressionUtils.isLiteral(value, Boolean.TRUE) || ExpressionUtils.isLiteral(value, Boolean.FALSE)) {
boolean foundResult = (boolean)((PsiLiteralExpression)value).getValue();
PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement);
if (nextReturnStatement != null && ExpressionUtils.isLiteral(nextReturnStatement.getReturnValue(), !foundResult)) {
String methodName = foundResult ? "anyMatch" : "noneMatch";
<BUG>String streamText = generateStream(iteratedValue, operations).toString();
</BUG>
streamText = addTerminalOperation(streamText, methodName, foreachStatement, tb);
restoreComments(foreachStatement, body);
boolean siblings = nextReturnStatement.getParent() == foreachStatement.getParent();

if (ExpressionUtils.isLiteral(value, Boolean.TRUE) || ExpressionUtils.isLiteral(value, Boolean.FALSE)) {
boolean foundResult = (boolean)((PsiLiteralExpression)value).getValue();
PsiReturnStatement nextReturnStatement = StreamApiMigrationInspection.getNextReturnStatement(foreachStatement);
if (nextReturnStatement != null && ExpressionUtils.isLiteral(nextReturnStatement.getReturnValue(), !foundResult)) {
String methodName = foundResult ? "anyMatch" : "noneMatch";
String streamText = generateStream(iteratedValue, tb.getLastOperation()).toString();
streamText = addTerminalOperation(streamText, methodName, foreachStatement, tb);
restoreComments(foreachStatement, body);
boolean siblings = nextReturnStatement.getParent() == foreachStatement.getParent();
