Program: 70015
Project: 70015
Buggy source:
/** 
 * @param ax
 * @param orthogonalAxis
 * @param iType
 * @return
 * @throws ChartException
 * @throws IllegalArgumentException
 */
protected final DataSetIterator getAncillaryDataSet(Axis ax,Axis orthogonalAxis,int iType) throws ChartException, IllegalArgumentException {
  final Series[] sea=ax.getRuntimeSeries();
  final Series[] osea=orthogonalAxis.getRuntimeSeries();
  if (sea.length == 0 || osea.length == 0) {
    if ((iType & NUMERICAL) == NUMERICAL) {
      return new DataSetIterator(new Double[]{new Double(1),new Double(2)});
    }
 else     if ((iType & DATE_TIME) == DATE_TIME) {
      return new DataSetIterator(new Calendar[]{new CDateTime(),new CDateTime()});
    }
 else     if ((iType & TEXT) == TEXT) {
      List<String> data=new ArrayList<String>();
      for (int i=0; i < osea.length; i++) {
        data.add(String.valueOf(osea[i].getSeriesIdentifier()));
      }
      return new DataSetIterator(data.toArray(new String[data.size()]));
    }
  }
  DataSetIterator dsi=getTypedDataSet(sea[0],iType);
  List<Object> data=new ArrayList<Object>();
  for (int i=0; i < osea.length; i++) {
    if (dsi.hasNext()) {
      data.add(dsi.next());
    }
 else     if ((iType & NUMERICAL) == NUMERICAL) {
      data.add(new Double(0));
    }
 else     if ((iType & DATE_TIME) == DATE_TIME) {
      data.add(new CDateTime());
    }
 else     if ((iType & TEXT) == TEXT) {
      data.add(osea[i].getSeriesIdentifier());
    }
  }
  if ((iType & NUMERICAL) == NUMERICAL) {
    return new DataSetIterator(NumberDataSetImpl.create(data));
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    return new DataSetIterator(DateTimeDataSetImpl.create(data));
  }
 else   if ((iType & TEXT) == TEXT) {
    return new DataSetIterator(TextDataSetImpl.create(data));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param ax
 * @param orthogonalAxis
 * @param iType
 * @return
 * @throws ChartException
 * @throws IllegalArgumentException
 */
protected final DataSetIterator getAncillaryDataSet(Axis ax,Axis orthogonalAxis,int iType) throws ChartException, IllegalArgumentException {
  final Series[] sea=ax.getRuntimeSeries();
  final Series[] osea=orthogonalAxis.getRuntimeSeries();
  if (sea.length == 0 || osea.length == 0) {
    if ((iType & NUMERICAL) == NUMERICAL) {
      return new DataSetIterator(new Double[]{new Double(1),new Double(2)});
    }
 else     if ((iType & DATE_TIME) == DATE_TIME) {
      return new DataSetIterator(new Calendar[]{new CDateTime(),new CDateTime()});
    }
 else     if ((iType & TEXT) == TEXT) {
      List<String> data=new ArrayList<String>();
      if (osea.length > 0) {
        for (int i=0; i < osea.length; i++) {
          data.add(String.valueOf(osea[i].getSeriesIdentifier()));
        }
      }
 else {
        data.add("String_Node_Str");
      }
      return new DataSetIterator(data.toArray(new String[data.size()]));
    }
  }
  DataSetIterator dsi=getTypedDataSet(sea[0],iType);
  List<Object> data=new ArrayList<Object>();
  for (int i=0; i < osea.length; i++) {
    if (dsi.hasNext()) {
      data.add(dsi.next());
    }
 else     if ((iType & NUMERICAL) == NUMERICAL) {
      data.add(new Double(0));
    }
 else     if ((iType & DATE_TIME) == DATE_TIME) {
      data.add(new CDateTime());
    }
 else     if ((iType & TEXT) == TEXT) {
      data.add(osea[i].getSeriesIdentifier());
    }
  }
  if ((iType & NUMERICAL) == NUMERICAL) {
    return new DataSetIterator(NumberDataSetImpl.create(data));
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    return new DataSetIterator(DateTimeDataSetImpl.create(data));
  }
 else   if ((iType & TEXT) == TEXT) {
    return new DataSetIterator(TextDataSetImpl.create(data));
  }
  return null;
}