@Override
  PsiElement migrate(@NotNull Project project, @NotNull PsiElement body, @NotNull TerminalBlock tb) {
    JoiningTerminal terminal = extractTerminal(tb, null);
    if(terminal == null) return null;

    TerminalBlock block = terminal.getTerminalBlock();
    PsiStatement loopStatement = block.getStreamSourceStatement();
    CommentTracker ct = new CommentTracker();
    String stream = terminal.generateStreamCode(ct);
    PsiVariable builder = terminal.getBuilder();
    terminal.preCleanUp(ct);
    ControlFlowUtils.InitializerUsageStatus status = getInitializerUsageStatus(builder, loopStatement);
    if(builder instanceof PsiLocalVariable) {
      PsiElement result = replaceInitializer(loopStatement, builder, builder.getInitializer(), stream, status, ct);
      terminal.cleanUp((PsiLocalVariable)builder);
      JoiningTerminal.replaceUsages((PsiLocalVariable)terminal.getBuilder());
      return result;
    } else {
      return new CommentTracker().replaceAndRestoreComments(tb.getStreamSourceStatement(), builder.getName() + ".append(" +  stream + ");");
    }
  }
@Override
  PsiElement migrate(@NotNull Project project, @NotNull PsiElement body, @NotNull TerminalBlock tb)