Source:
private RowMapBuffer getTransactionRows() throws Exception { BinlogEventV4 v4Event; MaxwellAbstractRowsEvent event; RowMapBuffer buffer = new RowMapBuffer(MAX_TX_ELEMENTS); while ( true ) { v4Event = pollV4EventFromQueue(); if (v4Event == null) { ensureReplicatorThread(); continue; } setReplicatorPosition((AbstractRowEvent) v4Event); switch(v4Event.getHeader().getEventType()) { case MySQLConstants.WRITE_ROWS_EVENT: case MySQLConstants.WRITE_ROWS_EVENT_V2: case MySQLConstants.UPDATE_ROWS_EVENT: case MySQLConstants.UPDATE_ROWS_EVENT_V2: case MySQLConstants.DELETE_ROWS_EVENT: case MySQLConstants.DELETE_ROWS_EVENT_V2: rowEventsProcessed++; event = processRowsEvent((AbstractRowEvent) v4Event); if ( event == null ) { continue; } if ( event.matchesFilter() ) { for ( RowMap r : event.jsonMaps() ) buffer.add(r); } break; case MySQLConstants.TABLE_MAP_EVENT: tableCache.processEvent(getSchema(), this.filter, (TableMapEvent) v4Event); break; case MySQLConstants.QUERY_EVENT: QueryEvent qe = (QueryEvent) v4Event; String sql = qe.getSql().toString(); if ( sql.equals("COMMIT") ) { if ( !buffer.isEmpty() ) buffer.getLast().setTXCommit(); return buffer; } else if ( sql.toUpperCase().startsWith("SAVEPOINT")) { LOGGER.info("Ignoring SAVEPOINT in transaction: " + qe); } else if ( createTablePattern.matcher(sql).find() ) { processQueryEvent(qe); } else { LOGGER.warn("Unhandled QueryEvent inside transaction: " + qe); } break; case MySQLConstants.XID_EVENT: XidEvent xe = (XidEvent) v4Event; buffer.setXid(xe.getXid()); if ( !buffer.isEmpty() ) buffer.getLast().setTXCommit(); return buffer; } } }

Target:
private RowMapBuffer getTransactionRows() throws Exception { BinlogEventV4 v4Event; MaxwellAbstractRowsEvent event; RowMapBuffer buffer = new RowMapBuffer(MAX_TX_ELEMENTS); while ( true ) { v4Event = pollV4EventFromQueue(); if (v4Event == null) { ensureReplicatorThread(); continue; } setReplicatorPosition((AbstractBinlogEventV4) v4Event); switch(v4Event.getHeader().getEventType()) { case MySQLConstants.WRITE_ROWS_EVENT: case MySQLConstants.WRITE_ROWS_EVENT_V2: case MySQLConstants.UPDATE_ROWS_EVENT: case MySQLConstants.UPDATE_ROWS_EVENT_V2: case MySQLConstants.DELETE_ROWS_EVENT: case MySQLConstants.DELETE_ROWS_EVENT_V2: rowEventsProcessed++; event = processRowsEvent((AbstractRowEvent) v4Event); if ( event == null ) { continue; } if ( event.matchesFilter() ) { for ( RowMap r : event.jsonMaps() ) buffer.add(r); } break; case MySQLConstants.TABLE_MAP_EVENT: tableCache.processEvent(getSchema(), this.filter, (TableMapEvent) v4Event); break; case MySQLConstants.QUERY_EVENT: QueryEvent qe = (QueryEvent) v4Event; String sql = qe.getSql().toString(); if ( sql.equals("COMMIT") ) { if ( !buffer.isEmpty() ) buffer.getLast().setTXCommit(); return buffer; } else if ( sql.toUpperCase().startsWith("SAVEPOINT")) { LOGGER.info("Ignoring SAVEPOINT in transaction: " + qe); } else if ( createTablePattern.matcher(sql).find() ) { processQueryEvent(qe); } else { LOGGER.warn("Unhandled QueryEvent inside transaction: " + qe); } break; case MySQLConstants.XID_EVENT: XidEvent xe = (XidEvent) v4Event; buffer.setXid(xe.getXid()); if ( !buffer.isEmpty() ) buffer.getLast().setTXCommit(); return buffer; } } }