Program: 71447
Project: 71447
Buggy source:
/** 
 * Zooms OUT 'once' into a scale of type numerical or datetime Typically, this is called in a loop until label overlaps occur
 */
public final boolean zoomOut(){
  if (bStepFixed || this.getTickCordinates().size() < 3) {
    return false;
  }
  if (((Number)oStep).doubleValue() >= Double.MAX_VALUE) {
    return false;
  }
  if ((iType & NUMERICAL) == NUMERICAL) {
    if ((iType & LOGARITHMIC) == LOGARITHMIC) {
      final double dStep=asDouble(oStep).doubleValue();
      if ((Math.log(dStep) / LOG_10) >= 1) {
        oStep=new Double(dStep * 10);
      }
 else {
        final int n=iaLogarithmicDeltas.length;
        for (int i=0; i < n; i++) {
          if ((int)dStep == iaLogarithmicDeltas[i]) {
            oStep=new Double(iaLogarithmicDeltas[i + 1]);
            return true;
          }
        }
        return false;
      }
    }
 else     if ((iType & LINEAR) == LINEAR) {
      double dStep=asDouble(oStep).doubleValue();
      if (bIntegralZoom) {
        double dPower=Math.log(dStep) / LOG_10;
        if (dPower < 0) {
          dPower=Math.floor(dPower);
        }
 else {
          dPower=ChartUtil.alignWithInt(dPower,false);
        }
        dPower=Math.pow(10,dPower);
        dStep/=dPower;
        dStep=Math.round(dStep);
        int n=iaLinearDeltas.length;
        int i=0;
        for (; i < n; i++) {
          if (dStep < iaLinearDeltas[i]) {
            dStep=iaLinearDeltas[i] * dPower;
            break;
          }
        }
        if (i == n) {
          dPower*=20;
          dStep=iaLinearDeltas[0] * dPower;
        }
        if (((Number)oStep).doubleValue() == dStep) {
          return false;
        }
      }
 else {
        dStep*=2;
      }
      dStep=ChartUtil.alignWithInt(dStep,false);
      oStep=new Double(dStep);
    }
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(oStep);
    int iUnit=asInteger(oUnit);
    for (int icu=0; icu < iaCalendarUnits.length; icu++) {
      if (iUnit == iaCalendarUnits[icu]) {
        ia=iaCalendarDeltas[icu];
        if (ia == null) {
          iStep++;
          oStep=new Integer(iStep);
        }
 else {
          int i=0, n=ia.length;
          for (; i < n; i++) {
            if (ia[i] == iStep) {
              break;
            }
          }
          if (i == n - 1) {
            ia=iaCalendarDeltas[icu + 1];
            oUnit=new Integer(iaCalendarUnits[icu + 1]);
            if (ia == null) {
              oStep=new Integer(1);
              return true;
            }
            i=-1;
          }
          oStep=new Integer(ia[i + 1]);
          break;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Zooms OUT 'once' into a scale of type numerical or datetime Typically, this is called in a loop until label overlaps occur
 */
public final boolean zoomOut(){
  if (bStepFixed || this.getTickCordinates().size() < 3) {
    return false;
  }
  if (((Number)oStep).doubleValue() >= Double.MAX_VALUE) {
    return false;
  }
  if ((iType & NUMERICAL) == NUMERICAL) {
    if ((iType & LOGARITHMIC) == LOGARITHMIC) {
      final double dStep=asDouble(oStep).doubleValue();
      if ((Math.log(dStep) / LOG_10) >= 1) {
        setStep(new Double(dStep * 10));
      }
 else {
        final int n=iaLogarithmicDeltas.length;
        for (int i=0; i < n; i++) {
          if ((int)dStep == iaLogarithmicDeltas[i]) {
            setStep(new Double(iaLogarithmicDeltas[i + 1]));
            return true;
          }
        }
        return false;
      }
    }
 else     if ((iType & LINEAR) == LINEAR) {
      double dStep=asDouble(oStep).doubleValue();
      if (bIntegralZoom) {
        double dPower=Math.log(dStep) / LOG_10;
        if (dPower < 0) {
          dPower=Math.floor(dPower);
          dPower=Math.pow(10,dPower);
        }
 else {
          dPower=dStep;
        }
        dStep/=dPower;
        dStep=Math.round(dStep);
        int n=iaLinearDeltas.length;
        int i=0;
        for (; i < n; i++) {
          if (dStep < iaLinearDeltas[i]) {
            dStep=iaLinearDeltas[i] * dPower;
            break;
          }
        }
        if (i == n) {
          dPower*=20;
          dStep=iaLinearDeltas[0] * dPower;
        }
        if (((Number)oStep).doubleValue() == dStep) {
          return false;
        }
      }
 else {
        dStep*=2;
      }
      dStep=ChartUtil.alignWithInt(dStep,false);
      setStep(new Double(dStep));
    }
  }
 else   if ((iType & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(oStep);
    int iUnit=asInteger(oUnit);
    for (int icu=0; icu < iaCalendarUnits.length; icu++) {
      if (iUnit == iaCalendarUnits[icu]) {
        ia=iaCalendarDeltas[icu];
        if (ia == null) {
          iStep++;
          setStep(new Integer(iStep));
        }
 else {
          int i=0, n=ia.length;
          for (; i < n; i++) {
            if (ia[i] == iStep) {
              break;
            }
          }
          if (i == n - 1) {
            ia=iaCalendarDeltas[icu + 1];
            oUnit=new Integer(iaCalendarUnits[icu + 1]);
            if (ia == null) {
              setStep(new Integer(1));
              return true;
            }
            i=-1;
          }
          setStep(new Integer(ia[i + 1]));
          break;
        }
      }
    }
  }
  return true;
}