Program: 69319
Project: 69319
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 (info.bStepFixed || this.getTickCordinates().size() < 3) {
    return false;
  }
  Object oStep=context.getStep();
  if (((Number)oStep).doubleValue() >= Double.MAX_VALUE) {
    return false;
  }
  if ((info.type & NUMERICAL) == NUMERICAL) {
    if ((info.type & 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 ((info.type & LINEAR) == LINEAR) {
      if (asDouble(context.getMin()).doubleValue() * asDouble(context.getMax()).doubleValue() < 0 && this.getTickCordinates().size() <= 3) {
        return false;
      }
      double dStep=asDouble(oStep).doubleValue();
      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;
      }
      dStep=ChartUtil.alignWithInt(dStep,false);
      setStep(new Double(dStep));
    }
  }
 else   if ((info.type & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(oStep);
    int iUnit=asInteger(context.getUnit());
    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];
            context.setUnit(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 (info.bStepFixed || this.getTickCordinates().size() < 3) {
    return false;
  }
  Object oStep=context.getStep();
  if (((Number)oStep).doubleValue() >= Double.MAX_VALUE) {
    return false;
  }
  if ((info.type & NUMERICAL) == NUMERICAL) {
    if ((info.type & 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 ((info.type & LINEAR) == LINEAR) {
      if (asDouble(context.getMin()).doubleValue() * asDouble(context.getMax()).doubleValue() < 0 && this.getTickCordinates().size() <= 3) {
        return false;
      }
      double dStep=asDouble(oStep).doubleValue();
      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 (ChartUtil.mathEqual(((Number)oStep).doubleValue(),dStep)) {
        return false;
      }
      dStep=ChartUtil.alignWithInt(dStep,false);
      setStep(new Double(dStep));
    }
  }
 else   if ((info.type & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(oStep);
    int iUnit=asInteger(context.getUnit());
    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];
            context.setUnit(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;
}