Program: 69087
Project: 69087
Buggy source:
public Object getMinimum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  if (ds instanceof NumberDataSet) {
    boolean bAnyNonNull=false;
    Object o;
    double d, dMin=0;
    while (dsi.hasNext()) {
      o=dsi.next();
      if (o == null) {
        continue;
      }
      d=((Number)o).doubleValue();
      if (!bAnyNonNull) {
        dMin=d;
        bAnyNonNull=true;
      }
 else       if (dMin > d) {
        dMin=d;
      }
    }
    if (!bAnyNonNull) {
      logger.log(new ChartException(ChartEngineExtensionPlugin.ID,ChartException.ALL_NULL_DATASET,"String_Node_Str",Messages.getResourceBundle(getULocale())));
    }
    return new Double(dMin);
  }
 else   if (ds instanceof DateTimeDataSet) {
    boolean bAnyNonNull=false;
    Calendar cal=null;
    Calendar calMin=Calendar.getInstance(getULocale());
    while (dsi.hasNext()) {
      cal=(Calendar)dsi.next();
      if (cal == null) {
        continue;
      }
      if (!bAnyNonNull) {
        calMin=cal;
        bAnyNonNull=true;
      }
 else       if (calMin.after(cal)) {
        calMin=cal;
      }
    }
    if (!bAnyNonNull) {
      logger.log(new ChartException(ChartEngineExtensionPlugin.ID,ChartException.ALL_NULL_DATASET,"String_Node_Str",Messages.getResourceBundle(getULocale())));
    }
    return calMin;
  }
  return null;
}

Fixed version (ground truth):
public Object getMinimum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  if (ds instanceof NumberDataSet) {
    boolean bAnyNonNull=false;
    Object o;
    double d, dMin=0;
    while (dsi.hasNext()) {
      o=dsi.next();
      if (o == null) {
        continue;
      }
      d=((Number)o).doubleValue();
      if (Double.isNaN(d) || Double.isInfinite(d)) {
        continue;
      }
      if (!bAnyNonNull) {
        dMin=d;
        bAnyNonNull=true;
      }
 else       if (dMin > d) {
        dMin=d;
      }
    }
    if (!bAnyNonNull) {
      logger.log(new ChartException(ChartEngineExtensionPlugin.ID,ChartException.ALL_NULL_DATASET,"String_Node_Str",Messages.getResourceBundle(getULocale())));
    }
    return new Double(dMin);
  }
 else   if (ds instanceof DateTimeDataSet) {
    boolean bAnyNonNull=false;
    Calendar cal=null;
    Calendar calMin=Calendar.getInstance(getULocale());
    while (dsi.hasNext()) {
      cal=(Calendar)dsi.next();
      if (cal == null) {
        continue;
      }
      if (!bAnyNonNull) {
        calMin=cal;
        bAnyNonNull=true;
      }
 else       if (calMin.after(cal)) {
        calMin=cal;
      }
    }
    if (!bAnyNonNull) {
      logger.log(new ChartException(ChartEngineExtensionPlugin.ID,ChartException.ALL_NULL_DATASET,"String_Node_Str",Messages.getResourceBundle(getULocale())));
    }
    return calMin;
  }
  return null;
}