PsiElement () { PsiElement result = myMigration.migrate(myMainStatement.getProject(), myLambdaBody, myTerminalBlock); if (result != null) { myTerminalBlock.operations().forEach(StreamApiMigrationInspection.Operation::cleanUp); } return result; }