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);
<BUG>boolean siblings = nextReturnStatement.getParent() == foreachStatement.getParent();

PsiElement result =
foreachStatement.replace(elementFactory.createStatementFromText("return " + streamText + ";", foreachStatement));
if (siblings) {</BUG>
nextReturnStatement.delete();

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);
if (nextReturnStatement.getParent() == foreachStatement.getParent()) {
