Program: 75750
Project: 75750
Buggy source:
/** 
 * Computes min, max value, step size and step number of the Axis
 * @param oMinValue min value in data points. Double or CDateTime type.
 * @param oMaxValue max value in data points. Double or CDateTime type.
 */
public final void updateAxisMinMax(Object oMinValue,Object oMaxValue){
  if ((iType & LOGARITHMIC) == LOGARITHMIC) {
    if ((iType & PERCENT) == PERCENT) {
      oMaximum=new Double(100);
      oMinimum=new Double(1);
      oStep=new Double(10);
      bMaximumFixed=true;
      bMinimumFixed=true;
      bStepFixed=true;
      return;
    }
    final double dMinValue=asDouble(oMinValue).doubleValue();
    final double dMaxValue=asDouble(oMaxValue).doubleValue();
    final double dAbsMax=Math.abs(dMaxValue);
    final double dAbsMin=Math.abs(dMinValue);
    final double dStep=asDouble(oStep).doubleValue();
    final double dStepLog=Math.log(dStep);
    int iPow=(int)Math.floor(Math.log(dAbsMax) / dStepLog) + 1;
    double dMaxAxis=Math.pow(dStep,iPow);
    iPow=(int)Math.floor(Math.log(dAbsMin) / dStepLog) - 1;
    double dMinAxis=Math.pow(dStep,iPow + 1);
    if (!bMaximumFixed) {
      oMaximum=new Double(dMaxAxis);
    }
    if (!bMinimumFixed) {
      oMinimum=new Double(dMinAxis);
    }
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    int iUnit=asInteger(oUnit);
    int iStep=asInteger(oStep);
    CDateTime cdtMinValue=asDateTime(oMinValue);
    CDateTime cdtMaxValue=asDateTime(oMaxValue);
    if (!bMinimumFixed) {
      oMinimum=cdtMinValue.backward(iUnit,iStep);
    }
    ((CDateTime)oMinimum).clearBelow(iUnit);
    if (!bMaximumFixed) {
      oMaximum=cdtMaxValue.forward(iUnit,iStep);
    }
    ((CDateTime)oMaximum).clearBelow(iUnit);
  }
 else {
    ScaleContext sct=new ScaleContext(iMarginPercent,iType,oMinValue,oMaxValue,oStep);
    sct.setFixedValue(bMinimumFixed,bMaximumFixed,oMinimum,oMaximum);
    sct.setFixedStep(bStepFixed,oStepNumber);
    sct.computeMinMax();
    updateContext(sct);
  }
}

Fixed version (ground truth):
/** 
 * Computes min, max value, step size and step number of the Axis
 * @param oMinValue min value in data points. Double or CDateTime type.
 * @param oMaxValue max value in data points. Double or CDateTime type.
 */
public final void updateAxisMinMax(Object oMinValue,Object oMaxValue){
  if ((iType & LOGARITHMIC) == LOGARITHMIC) {
    if ((iType & PERCENT) == PERCENT) {
      oMaximum=new Double(100);
      oMinimum=new Double(1);
      oStep=new Double(10);
      bMaximumFixed=true;
      bMinimumFixed=true;
      bStepFixed=true;
      return;
    }
    double dMinValue=asDouble(oMinValue).doubleValue();
    double dMaxValue=asDouble(oMaxValue).doubleValue();
    final double dAbsMax=Math.abs(dMaxValue);
    final double dAbsMin=Math.abs(dMinValue);
    final double dStep=asDouble(oStep).doubleValue();
    final double dStepLog=Math.log(dStep);
    int iPow=(int)Math.floor(Math.log(dAbsMax) / dStepLog) + 1;
    double dMaxAxis=Math.pow(dStep,iPow);
    iPow=(int)Math.floor(Math.log(dAbsMin) / dStepLog) - 1;
    double dMinAxis=Math.pow(dStep,iPow + 1);
    if (!bMaximumFixed) {
      oMaximum=new Double(dMaxAxis);
    }
    if (!bMinimumFixed) {
      oMinimum=new Double(dMinAxis);
    }
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    int iUnit=asInteger(oUnit);
    int iStep=asInteger(oStep);
    CDateTime cdtMinValue=asDateTime(oMinValue);
    CDateTime cdtMaxValue=asDateTime(oMaxValue);
    if (!bMinimumFixed) {
      oMinimum=cdtMinValue.backward(iUnit,iStep);
    }
    ((CDateTime)oMinimum).clearBelow(iUnit);
    if (!bMaximumFixed) {
      oMaximum=cdtMaxValue.forward(iUnit,iStep);
    }
    ((CDateTime)oMaximum).clearBelow(iUnit);
  }
 else {
    ScaleContext sct=new ScaleContext(iMarginPercent,iType,oMinValue,oMaxValue,oStep);
    sct.setFixedValue(bMinimumFixed,bMaximumFixed,oMinimum,oMaximum);
    sct.setFixedStep(bStepFixed,oStepNumber);
    sct.computeMinMax();
    updateContext(sct);
  }
}