m_Classifier.buildClassifier(dataset);
  private void handleIncrementalEvent() {    if (m_buildThread != null) {      String messg = "Classifier is currently batch training!";      if (m_log != null) {	m_log.logMessage(messg);      } else {	System.err.println(messg);      }      return;    }    if (m_incrementalEvent.getStatus() == InstanceEvent.FORMAT_AVAILABLE) {      Instances dataset = m_incrementalEvent.getInstance().dataset();      // default to the last column if no class is set      if (dataset.classIndex() < 0) {	//	System.err.println("Classifier : setting class index...");	dataset.setClassIndex(dataset.numAttributes()-1);      }      try {	// initialize classifier if m_trainingSet is null	// otherwise assume that classifier has been pre-trained in batch	// mode, *if* headers match	if (m_trainingSet == null || (!dataset.equalHeaders(m_trainingSet))) {	  if (!(m_Classifier instanceof 		weka.classifiers.UpdateableClassifier)) {	    if (m_log != null) {	      String msg = (m_trainingSet == null)		? "ERROR : "+m_Classifier.getClass().getName()		+" has not been batch "		+"trained; can't process instance events."		: "ERROR : instance event's structure is different from "		+"the data that "		+ "was used to batch train this classifier; can't continue.";	      m_log.logMessage(msg);	    }	    return;	  }	  if (m_trainingSet != null && 	      (!dataset.equalHeaders(m_trainingSet))) {	    if (m_log != null) {	      m_log.logMessage("Warning : structure of instance events differ "			       +"from data used in batch training this "			       +"classifier. Resetting classifier...");	    }	    m_trainingSet = null;	  }	  if (m_trainingSet == null) {	    // initialize the classifier if it hasn't been trained yet	    m_Classifier.buildClassifier(dataset);	    m_trainingSet = new Instances(dataset, 0);	  }	}      } catch (Exception ex) {	ex.printStackTrace();      }    }        try {      // test on this instance      int status = IncrementalClassifierEvent.WITHIN_BATCH;      if (m_incrementalEvent.getStatus() == InstanceEvent.FORMAT_AVAILABLE) {	status = IncrementalClassifierEvent.NEW_BATCH;      } else if (m_incrementalEvent.getStatus() ==		 InstanceEvent.BATCH_FINISHED) {	status = IncrementalClassifierEvent.BATCH_FINISHED;      }            m_ie.setStatus(status); m_ie.setClassifier(m_Classifier);      m_ie.setCurrentInstance(m_incrementalEvent.getInstance());            notifyIncrementalClassifierListeners(m_ie);            // now update on this instance (if class is not missing and classifier      // is updateable and user has specified that classifier is to be      // updated)      if (m_Classifier instanceof weka.classifiers.UpdateableClassifier &&	  m_updateIncrementalClassifier == true &&	  !(m_incrementalEvent.getInstance().	    isMissing(m_incrementalEvent.getInstance().		      dataset().classIndex()))) {	((weka.classifiers.UpdateableClassifier)m_Classifier).	  updateClassifier(m_incrementalEvent.getInstance());      }      if (m_incrementalEvent.getStatus() == 	  InstanceEvent.BATCH_FINISHED) {	if (m_textListeners.size() > 0) {	  String modelString = m_Classifier.toString();	  String titleString = m_Classifier.getClass().getName();	  titleString = titleString.	    substring(titleString.lastIndexOf('.') + 1,		      titleString.length());	  titleString = "( "+m_trainingSet.relationName() + ") " + titleString	    + " model";	  TextEvent nt = new TextEvent(this,				       modelString,				       titleString);	  notifyTextListeners(nt);	}      }    } catch (Exception ex) {      if (m_log != null) {	m_log.logMessage(ex.toString());      }      ex.printStackTrace();    }  }