Program: 53146
Project: 53146
Buggy source:
private void generateSeries() throws IOException, FormatErrorException {
  dataset.removeAllSeries();
  PlotProcessor[] processors=new PlotProcessor[processorsListModel.size()];
  long timeOffset=getTimeOffset(timeMode);
  Range range=getLogRange(timeMode);
  long timeStart=(long)((range.getLowerBound() - range.getLength()) * 1e6);
  long timeStop=(long)((range.getUpperBound() + range.getLength()) * 1e6);
  timeStart=Math.max(logReader.getStartMicroseconds(),timeStart);
  timeStop=Math.min(logReader.getStartMicroseconds() + logReader.getSizeMicroseconds(),timeStop);
  double timeScale=(selectDomainAxis(timeMode) == domainAxisDate) ? 1000.0 : 1.0;
  int displayPixels=2000;
  double skip=range.getLength() / displayPixels;
  if (processors.length > 0) {
    for (int i=0; i < processorsListModel.size(); i++) {
      ProcessorPreset pp=(ProcessorPreset)processorsListModel.get(i);
      PlotProcessor processor;
      try {
        processor=processorsTypesList.getProcessorInstance(pp,skip);
        processors[i]=processor;
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    logReader.seek(timeStart);
    Map<String,Object> data=new HashMap<String,Object>();
    while (true) {
      long t;
      data.clear();
      try {
        t=logReader.readUpdate(data);
      }
 catch (      EOFException e) {
        break;
      }
      if (t > timeStop) {
        break;
      }
      for (      PlotProcessor processor : processors) {
        processor.process((t + timeOffset) * 1e-6,data);
      }
    }
    for (int i=0; i < processors.length; i++) {
      PlotProcessor processor=processors[i];
      String processorTitle=((ProcessorPreset)processorsListModel.get(i)).getTitle();
      for (      Series series : processor.getSeriesList()) {
        XYSeries jseries=new XYSeries(processorTitle + (series.getTitle().isEmpty() ? "String_Node_Str" : ("String_Node_Str" + series.getTitle())),false);
        for (        XYPoint point : series) {
          jseries.add(point.x * timeScale,point.y);
        }
        dataset.addSeries(jseries);
        jFreeChart.getXYPlot().getRendererForDataset(dataset).setSeriesPaint(dataset.indexOf(jseries),series.getColor());
      }
    }
  }
  chartPanel.repaint();
}

Fixed version (ground truth):
private void generateSeries() throws IOException, FormatErrorException {
  dataset.removeAllSeries();
  seriesIndex.clear();
  PlotProcessor[] processors=new PlotProcessor[processorsListModel.size()];
  long timeOffset=getTimeOffset(timeMode);
  Range range=getLogRange(timeMode);
  long timeStart=(long)((range.getLowerBound() - range.getLength()) * 1e6);
  long timeStop=(long)((range.getUpperBound() + range.getLength()) * 1e6);
  timeStart=Math.max(logReader.getStartMicroseconds(),timeStart);
  timeStop=Math.min(logReader.getStartMicroseconds() + logReader.getSizeMicroseconds(),timeStop);
  double timeScale=(selectDomainAxis(timeMode) == domainAxisDate) ? 1000.0 : 1.0;
  int displayPixels=2000;
  double skip=range.getLength() / displayPixels;
  if (processors.length > 0) {
    for (int i=0; i < processorsListModel.size(); i++) {
      ProcessorPreset pp=(ProcessorPreset)processorsListModel.get(i);
      PlotProcessor processor;
      try {
        processor=processorsTypesList.getProcessorInstance(pp,skip);
        processors[i]=processor;
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
    logReader.seek(timeStart);
    Map<String,Object> data=new HashMap<String,Object>();
    while (true) {
      long t;
      data.clear();
      try {
        t=logReader.readUpdate(data);
      }
 catch (      EOFException e) {
        break;
      }
      if (t > timeStop) {
        break;
      }
      for (      PlotProcessor processor : processors) {
        processor.process((t + timeOffset) * 1e-6,data);
      }
    }
    for (int i=0; i < processorsListModel.size(); i++) {
      PlotProcessor processor=processors[i];
      String processorTitle=((ProcessorPreset)processorsListModel.get(i)).getTitle();
      Map<String,Integer> processorSeriesIndex=new HashMap<String,Integer>();
      seriesIndex.add(processorSeriesIndex);
      for (      Series series : processor.getSeriesList()) {
        processorSeriesIndex.put(series.getTitle(),dataset.getSeriesCount());
        XYSeries jseries=new XYSeries(series.getFullTitle(processorTitle),false);
        for (        XYPoint point : series) {
          jseries.add(point.x * timeScale,point.y);
        }
        dataset.addSeries(jseries);
      }
    }
    setChartColors();
  }
  chartPanel.repaint();
}