protected DBMSEvent extractEventStatementLevel(String firstData) throws InterruptedException, ExtractorException {
  boolean doCommit;
  boolean first=true;
  if (!initialized)   throw new ExtractorException("Extractor not initialized");
  ArrayList<DBMSData> trx=new ArrayList<DBMSData>(128);
  while (true) {
    DBMSEvent dbmsEvent=null;
    String queryString;
    if (first)     queryString=firstData;
 else     queryString=getNextOp();
    first=false;
    if (queryString.compareTo("COMMIT") == 0) {
      doCommit=true;
    }
 else {
      doCommit=false;
    }
    if (queryString.indexOf("truncate") == 0 || queryString.indexOf("TRUNCATE") == 0) {
      trx.add(new StatementData(queryString));
      doCommit=true;
    }
    if (doCommit) {
      dbmsEvent=new DBMSEvent(lastEventID,trx,new Timestamp(System.currentTimeMillis()));
    }
 else {
      trx.add(new StatementData(queryString));
    }
    if (dbmsEvent != null) {
      return dbmsEvent;
    }
  }
}

protected DBMSEvent extractEventStatementLevel ( String firstData ) throws InterruptedException , ExtractorException { boolean doCommit ; boolean first = true ; if ( ! initialized ) throw new ExtractorException ( "Extractor not initialized" ) ; ArrayList < DBMSData > trx = new ArrayList < DBMSData > ( 128 ) ; while ( true ) { DBMSEvent dbmsEvent = null ; String queryString ; if ( first ) queryString = firstData ; else queryString = getNextOp ( ) ; first = false ; if ( queryString . compareTo ( "COMMIT" ) == 0 ) { doCommit = true ; } else { doCommit = false ; } if ( queryString . indexOf ( "truncate" ) == 0 || queryString . indexOf ( "TRUNCATE" ) == 0 ) { trx . add ( new StatementData ( queryString ) ) ; doCommit = true ; } if ( doCommit ) { dbmsEvent = new DBMSEvent ( lastEventID , trx , new Timestamp ( System . currentTimeMillis ( ) ) ) ; } else { trx . add ( new StatementData ( queryString ) ) ; } if ( dbmsEvent != null ) { return dbmsEvent ; } } }
return the next statement extracted from dslisten
