Program: 70445
Project: 70445
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) {
        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.log10(dStep);
        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(Integer.valueOf(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=Integer.valueOf(iaCalendarUnits[icu + 1]);
            if (ia == null) {
              setStep(Integer.valueOf(1));
              return true;
            }
            i=-1;
          }
          setStep(Integer.valueOf(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) {
      if (asDouble(oMinimum).doubleValue() * asDouble(oMaximum).doubleValue() < 0 && this.getTickCordinates().size() <= 3) {
        return false;
      }
      double dStep=asDouble(oStep).doubleValue();
      if (bIntegralZoom) {
        double dPower=Math.log10(dStep);
        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(Integer.valueOf(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=Integer.valueOf(iaCalendarUnits[icu + 1]);
            if (ia == null) {
              setStep(Integer.valueOf(1));
              return true;
            }
            i=-1;
          }
          setStep(Integer.valueOf(ia[i + 1]));
          break;
        }
      }
    }
  }
  return true;
}