Source:
<code>public static void printAsTableauForm( TableSchema tableSchema, Iterator<Row> it, PrintWriter printWriter, int maxColumnWidth, String nullColumn, boolean deriveColumnWidthByType, boolean printRowKind) { final List<TableColumn> columns = tableSchema.getTableColumns(); String[] columnNames = columns.stream().map(TableColumn::getName).toArray(String[]::new); if (printRowKind) { columnNames = Stream.concat(Stream.of(ROW_KIND_COLUMN), Arrays.stream(columnNames)).toArray(String[]::new); } final int[] colWidths; if (deriveColumnWidthByType) { colWidths = columnWidthsByType( columns, maxColumnWidth, nullColumn, printRowKind ? ROW_KIND_COLUMN : null); } else { <START> List<Row> rows = new ArrayList<>(); <END> List<String[]> content = new ArrayList<>(); content.add(columnNames); while (it.hasNext()) { Row row = it.next(); rows.add(row); content.add(rowToString(row, nullColumn, printRowKind)); } colWidths = columnWidthsByContent(columnNames, content, maxColumnWidth); it = rows.iterator(); } final String borderline = PrintUtils.genBorderLine(colWidths); printWriter.println(borderline); PrintUtils.printSingleRow(colWidths, columnNames, printWriter); printWriter.println(borderline); printWriter.flush(); long numRows = 0; while (it.hasNext()) { String[] cols = rowToString(it.next(), nullColumn, printRowKind); printSingleRow(colWidths, cols, printWriter); numRows++; } if (numRows > 0) { printWriter.println(borderline); } final String rowTerm; if (numRows > 1) { rowTerm = "rows"; } else { rowTerm = "row"; } printWriter.println(numRows + " " + rowTerm + " in set"); printWriter.flush(); }</code><technical_language>final anymore, a reader thinks variable is modified this is case. great final consistently</technical_language>

Target:
public static void printAsTableauForm( TableSchema tableSchema, Iterator<Row> it, PrintWriter printWriter, int maxColumnWidth, String nullColumn, boolean deriveColumnWidthByType, boolean printRowKind) { final List<TableColumn> columns = tableSchema.getTableColumns(); String[] columnNames = columns.stream().map(TableColumn::getName).toArray(String[]::new); if (printRowKind) { columnNames = Stream.concat(Stream.of(ROW_KIND_COLUMN), Arrays.stream(columnNames)).toArray(String[]::new); } final int[] colWidths; if (deriveColumnWidthByType) { colWidths = columnWidthsByType( columns, maxColumnWidth, nullColumn, printRowKind ? ROW_KIND_COLUMN : null); } else { final List<Row> rows = new ArrayList<>(); final List<String[]> content = new ArrayList<>(); content.add(columnNames); while (it.hasNext()) { Row row = it.next(); rows.add(row); content.add(rowToString(row, nullColumn, printRowKind)); } colWidths = columnWidthsByContent(columnNames, content, maxColumnWidth); it = rows.iterator(); } final String borderline = PrintUtils.genBorderLine(colWidths); printWriter.println(borderline); PrintUtils.printSingleRow(colWidths, columnNames, printWriter); printWriter.println(borderline); printWriter.flush(); long numRows = 0; while (it.hasNext()) { String[] cols = rowToString(it.next(), nullColumn, printRowKind); printSingleRow(colWidths, cols, printWriter); numRows++; } if (numRows > 0) { printWriter.println(borderline); } final String rowTerm; if (numRows > 1) { rowTerm = "rows"; } else { rowTerm = "row"; } printWriter.println(numRows + " " + rowTerm + " in set"); printWriter.flush(); }