Program: 64457
Project: 64457
Buggy source:
public void runVisual(){
  int processCounter=0;
  int speedCounter=0;
  LinkedList<DataPoint> pointBuffer0=new LinkedList<DataPoint>();
  while (work || processCounter != 0) {
    if (m_stream0.hasMoreInstances()) {
      timestamp++;
      speedCounter++;
      processCounter++;
      if (timestamp % 100 == 0) {
        m_visualPanel.setProcessedPointsCounter(timestamp);
      }
      Instance next0=m_stream0.nextInstance();
      DataPoint point0=new DataPoint(next0,timestamp);
      pointBuffer0.add(point0);
      while (pointBuffer0.size() > m_stream0_decayHorizon) {
        pointBuffer0.removeFirst();
      }
      if (m_visualPanel.isEnabledDrawPoints()) {
        m_streampanel0.drawPoint(point0);
        if (m_clusterer1 != null)         m_streampanel1.drawPoint(point0);
        if (processCounter % m_redrawInterval == 0) {
          m_streampanel0.applyDrawDecay(m_stream0_decayHorizon / (float)(m_redrawInterval));
          if (m_clusterer1 != null)           m_streampanel1.applyDrawDecay(m_stream0_decayHorizon / (float)(m_redrawInterval));
        }
      }
      Instance traininst0=new DenseInstance(point0);
      if (m_clusterer0.keepClassLabel())       traininst0.setDataset(point0.dataset());
 else       traininst0.deleteAttributeAt(point0.classIndex());
      m_clusterer0.trainOnInstanceImpl(traininst0);
      if (m_clusterer1 != null) {
        Instance traininst1=new DenseInstance(point0);
        if (m_clusterer1.keepClassLabel())         traininst1.setDataset(point0.dataset());
 else         traininst1.deleteAttributeAt(point0.classIndex());
        m_clusterer1.trainOnInstanceImpl(traininst1);
      }
      if (processCounter >= m_processFrequency) {
        processCounter=0;
        for (        DataPoint p : pointBuffer0)         p.updateWeight(timestamp,m_stream0_decay_rate);
        ArrayList<DataPoint> pointarray0=new ArrayList<DataPoint>(pointBuffer0);
        ArrayList<DataPoint> pointarray1=new ArrayList<DataPoint>(pointBuffer0);
        processClusterings(pointarray0,pointarray1);
        int pauseInterval=m_visualPanel.getPauseInterval();
        if (pauseInterval != 0 && lastPauseTimestamp + pauseInterval <= timestamp) {
          m_visualPanel.toggleVisualizer(true);
        }
      }
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
    if (speedCounter > m_wait_frequency * 30 && m_wait_frequency < 15) {
      try {
synchronized (this) {
          if (m_wait_frequency == 0)           wait(50);
 else           wait(1);
        }
      }
 catch (      InterruptedException ex) {
      }
      speedCounter=0;
    }
  }
  if (!stop) {
    m_streampanel0.drawPointPanels(pointBuffer0,timestamp,m_stream0_decay_rate,m_stream0_decay_threshold);
    if (m_clusterer1 != null)     m_streampanel1.drawPointPanels(pointBuffer0,timestamp,m_stream0_decay_rate,m_stream0_decay_threshold);
    work_pause();
  }
}

Fixed version (ground truth):
public void runVisual(){
  int processCounter=0;
  int speedCounter=0;
  LinkedList<DataPoint> pointBuffer0=new LinkedList<DataPoint>();
  LinkedList<DataPoint> pointBuffer1=new LinkedList<DataPoint>();
  ArrayList<DataPoint> pointarray0=null;
  ArrayList<DataPoint> pointarray1=null;
  while (work || processCounter != 0) {
    if (m_stream0.hasMoreInstances()) {
      timestamp++;
      speedCounter++;
      processCounter++;
      if (timestamp % 100 == 0) {
        m_visualPanel.setProcessedPointsCounter(timestamp);
      }
      Instance next0=m_stream0.nextInstance();
      DataPoint point0=new DataPoint(next0,timestamp);
      pointBuffer0.add(point0);
      while (pointBuffer0.size() > m_stream0_decayHorizon) {
        pointBuffer0.removeFirst();
      }
      DataPoint point1=null;
      if (m_clusterer1 != null) {
        point1=new DataPoint(next0,timestamp);
        pointBuffer1.add(point1);
        while (pointBuffer1.size() > m_stream0_decayHorizon) {
          pointBuffer1.removeFirst();
        }
      }
      if (m_visualPanel.isEnabledDrawPoints()) {
        m_streampanel0.drawPoint(point0);
        if (m_clusterer1 != null)         m_streampanel1.drawPoint(point1);
        if (processCounter % m_redrawInterval == 0) {
          m_streampanel0.applyDrawDecay(m_stream0_decayHorizon / (float)(m_redrawInterval));
          if (m_clusterer1 != null)           m_streampanel1.applyDrawDecay(m_stream0_decayHorizon / (float)(m_redrawInterval));
        }
      }
      Instance traininst0=new DenseInstance(point0);
      if (m_clusterer0.keepClassLabel())       traininst0.setDataset(point0.dataset());
 else       traininst0.deleteAttributeAt(point0.classIndex());
      m_clusterer0.trainOnInstanceImpl(traininst0);
      if (m_clusterer1 != null) {
        Instance traininst1=new DenseInstance(point1);
        if (m_clusterer1.keepClassLabel())         traininst1.setDataset(point1.dataset());
 else         traininst1.deleteAttributeAt(point1.classIndex());
        m_clusterer1.trainOnInstanceImpl(traininst1);
      }
      if (processCounter >= m_processFrequency) {
        processCounter=0;
        for (        DataPoint p : pointBuffer0)         p.updateWeight(timestamp,m_stream0_decay_rate);
        pointarray0=new ArrayList<DataPoint>(pointBuffer0);
        if (m_clusterer1 != null) {
          for (          DataPoint p : pointBuffer1)           p.updateWeight(timestamp,m_stream0_decay_rate);
          pointarray1=new ArrayList<DataPoint>(pointBuffer1);
        }
        processClusterings(pointarray0,pointarray1);
        int pauseInterval=m_visualPanel.getPauseInterval();
        if (pauseInterval != 0 && lastPauseTimestamp + pauseInterval <= timestamp) {
          m_visualPanel.toggleVisualizer(true);
        }
      }
    }
 else {
      System.out.println("String_Node_Str");
      return;
    }
    if (speedCounter > m_wait_frequency * 30 && m_wait_frequency < 15) {
      try {
synchronized (this) {
          if (m_wait_frequency == 0)           wait(50);
 else           wait(1);
        }
      }
 catch (      InterruptedException ex) {
      }
      speedCounter=0;
    }
  }
  if (!stop) {
    m_streampanel0.drawPointPanels(pointarray0,timestamp,m_stream0_decay_rate,m_stream0_decay_threshold);
    if (m_clusterer1 != null)     m_streampanel1.drawPointPanels(pointarray1,timestamp,m_stream0_decay_rate,m_stream0_decay_threshold);
    work_pause();
  }
}