Program: 22778
Project: 22778
Buggy source:
/** 
 * Train classifier with the current instances
 */
public boolean trainClassifier(){
  int nonEmpty=0;
  for (int i=0; i < numOfClasses; i++)   if (examples[i].size() > 0)   nonEmpty++;
  if (nonEmpty < 2 && loadedTrainingData == null) {
    IJ.showMessage("String_Node_Str");
    return false;
  }
  setButtonsEnabled(false);
  if (nonEmpty > 1 && featureStack.isEmpty() || updateFeatures) {
    IJ.showStatus("String_Node_Str");
    IJ.log("String_Node_Str");
    featureStack.updateFeaturesMT();
    filterFeatureStackByList();
    updateFeatures=false;
    updateWholeData=true;
    IJ.log("String_Node_Str");
  }
  IJ.showStatus("String_Node_Str");
  Instances data=null;
  if (nonEmpty < 2)   IJ.log("String_Node_Str");
 else {
    final long start=System.currentTimeMillis();
    data=createTrainingInstances();
    final long end=System.currentTimeMillis();
    IJ.log("String_Node_Str" + (end - start) + "String_Node_Str");
    data.setClassIndex(data.numAttributes() - 1);
  }
  if (loadedTrainingData != null && data != null) {
    IJ.log("String_Node_Str");
    for (int i=0; i < loadedTrainingData.numInstances(); i++)     data.add(loadedTrainingData.instance(i));
    IJ.log("String_Node_Str" + data.numInstances());
  }
 else   if (data == null) {
    data=loadedTrainingData;
    IJ.log("String_Node_Str");
  }
  IJ.showStatus("String_Node_Str");
  IJ.log("String_Node_Str");
  if (null == data) {
    IJ.log("String_Node_Str");
  }
  this.trainHeader=new Instances(data,0);
  final long start=System.currentTimeMillis();
  try {
    classifier.buildClassifier(data);
  }
 catch (  Exception e) {
    IJ.showMessage(e.getMessage());
    e.printStackTrace();
    return false;
  }
  IJ.log(this.classifier.toString());
  final long end=System.currentTimeMillis();
  IJ.log("String_Node_Str" + (end - start) + "String_Node_Str");
  return true;
}

Fixed version (ground truth):
/** 
 * Train classifier with the current instances
 */
public boolean trainClassifier(){
  int nonEmpty=0;
  for (int i=0; i < numOfClasses; i++)   if (examples[i].size() > 0)   nonEmpty++;
  if (nonEmpty < 2 && null == loadedTrainingData) {
    IJ.showMessage("String_Node_Str");
    return false;
  }
  setButtonsEnabled(false);
  if (nonEmpty > 1 && featureStack.isEmpty() || updateFeatures) {
    IJ.showStatus("String_Node_Str");
    IJ.log("String_Node_Str");
    featureStack.updateFeaturesMT();
    filterFeatureStackByList();
    updateFeatures=false;
    updateWholeData=true;
    IJ.log("String_Node_Str");
  }
  IJ.showStatus("String_Node_Str");
  Instances data=null;
  if (nonEmpty < 1)   IJ.log("String_Node_Str");
 else {
    final long start=System.currentTimeMillis();
    data=createTrainingInstances();
    final long end=System.currentTimeMillis();
    IJ.log("String_Node_Str" + (end - start) + "String_Node_Str");
  }
  if (loadedTrainingData != null && data != null) {
    IJ.log("String_Node_Str");
    for (int i=0; i < loadedTrainingData.numInstances(); i++)     data.add(loadedTrainingData.instance(i));
    IJ.log("String_Node_Str" + data.numInstances());
  }
 else   if (data == null) {
    data=loadedTrainingData;
    IJ.log("String_Node_Str");
  }
  IJ.showStatus("String_Node_Str");
  IJ.log("String_Node_Str");
  if (null == data) {
    IJ.log("String_Node_Str");
  }
  this.trainHeader=new Instances(data,0);
  final long start=System.currentTimeMillis();
  try {
    classifier.buildClassifier(data);
  }
 catch (  Exception e) {
    IJ.showMessage(e.getMessage());
    e.printStackTrace();
    return false;
  }
  IJ.log(this.classifier.toString());
  final long end=System.currentTimeMillis();
  IJ.log("String_Node_Str" + (end - start) + "String_Node_Str");
  return true;
}