Program: 75833
Project: 75833
Buggy source:
/** 
 * Updates AutoScale by checking min or max
 * @param sc
 * @param oMinimum
 * @param oMaximum
 * @param rtc
 * @param ax
 * @throws ChartException
 */
public static void setNumberMinMaxToScale(AutoScale sc,Object oMinimum,Object oMaximum,final RunTimeContext rtc,final OneAxis ax) throws ChartException {
  if (oMinimum != null) {
    if (oMinimum instanceof NumberDataElement) {
      sc.oMinimum=new Double(((NumberDataElement)oMinimum).getValue());
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMinimum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.bMinimumFixed=true;
  }
  if (oMaximum != null) {
    if (oMaximum instanceof NumberDataElement) {
      sc.oMaximum=new Double(((NumberDataElement)oMaximum).getValue());
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMaximum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.bMaximumFixed=true;
  }
  if (sc.bMaximumFixed && sc.bMinimumFixed) {
    if (((Double)sc.oMinimum).doubleValue() > ((Double)sc.oMaximum).doubleValue()) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMinimum,sc.oMaximum},Messages.getResourceBundle(rtc.getULocale()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates AutoScale by checking min or max
 * @param sc
 * @param oMinimum
 * @param oMaximum
 * @param rtc
 * @param ax
 * @throws ChartException
 */
public static void setNumberMinMaxToScale(AutoScale sc,Object oMinimum,Object oMaximum,final RunTimeContext rtc,final OneAxis ax) throws ChartException {
  double min, max;
  min=max=0;
  if (oMinimum != null) {
    if (oMinimum instanceof NumberDataElement) {
      min=((NumberDataElement)oMinimum).getValue();
      sc.oMinimum=new Double(min);
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMinimum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.bMinimumFixed=true;
  }
  if (oMaximum != null) {
    if (oMaximum instanceof NumberDataElement) {
      max=((NumberDataElement)oMaximum).getValue();
      sc.oMaximum=new Double(max);
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMaximum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.bMaximumFixed=true;
  }
  if (sc.bMaximumFixed && sc.bMinimumFixed) {
    if (((Double)sc.oMinimum).doubleValue() > ((Double)sc.oMaximum).doubleValue()) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.oMinimum,sc.oMaximum},Messages.getResourceBundle(rtc.getULocale()));
    }
  }
  if (sc.oOriginal != null) {
    double original=((Double)sc.oOriginal).doubleValue();
    if (sc.bMaximumFixed && sc.bMinimumFixed) {
      if (original < min && original < max) {
        sc.oMinimum=sc.oOriginal;
      }
      if (original > min && original > max) {
        sc.oMaximum=sc.oOriginal;
      }
    }
 else     if (sc.bMaximumFixed) {
      if (original > max) {
        sc.oMaximum=sc.oOriginal;
      }
    }
 else     if (sc.bMinimumFixed) {
      if (original < min) {
        sc.oMinimum=sc.oOriginal;
      }
    }
  }
}