Program: 69320
Project: 69320
Buggy source:
/** 
 * Zooms IN 'once' into a scale of type numerical or datetime Typically, this is called in a loop until label overlaps occur
 */
public final boolean zoomIn(){
  if (info.bStepFixed) {
    return false;
  }
  if (ChartUtil.mathEqual(0,((Number)context.getStep()).doubleValue())) {
    return false;
  }
  if ((info.type & NUMERICAL) == NUMERICAL) {
    if ((info.type & LOGARITHMIC) == LOGARITHMIC) {
      final double dStep=asDouble(context.getStep()).doubleValue();
      if ((Math.log(dStep) / LOG_10) > 1) {
        setStep(new Double(dStep / 10));
      }
 else {
        int n=iaLogarithmicDeltas.length;
        for (int i=n - 1; i >= 0; i--) {
          if ((int)dStep == iaLogarithmicDeltas[i]) {
            if (i > 0) {
              setStep(new Double(iaLogarithmicDeltas[i - 1]));
              return true;
            }
 else {
              return false;
            }
          }
        }
        return false;
      }
    }
 else     if ((info.type & LINEAR) == LINEAR) {
      double dStep=asDouble(context.getStep()).doubleValue();
      final double oldStep=dStep;
      double dPower=(Math.log(dStep) / LOG_10);
      dPower=Math.floor(dPower);
      dPower=Math.pow(10.0,dPower);
      dStep/=dPower;
      dStep=Math.round(dStep);
      int n=iaLinearDeltas.length;
      for (int i=0; i < n; i++) {
        if ((int)dStep == iaLinearDeltas[i]) {
          if (i > 0) {
            dStep=iaLinearDeltas[i - 1] * dPower;
          }
 else {
            dPower/=10;
            dStep=iaLinearDeltas[n - 2] * dPower;
          }
          break;
        }
      }
      if (dStep == oldStep) {
        dStep/=2;
      }
      setStep(new Double(dStep));
      if (((Number)context.getStep()).doubleValue() < info.dPrecision) {
        setStep(oldStep);
        return false;
      }
    }
  }
 else   if ((info.type & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(context.getStep());
    int iUnit=asInteger(context.getUnit());
    for (int icu=0; icu < iaCalendarUnits.length; icu++) {
      if (iUnit == iaCalendarUnits[icu]) {
        ia=iaCalendarDeltas[icu];
        if (ia == null) {
          iStep--;
          if (iStep == 0) {
            setStep(Integer.valueOf(iaMonthDeltas[iaMonthDeltas.length - 1]));
            context.setUnit(Integer.valueOf(Calendar.MONTH));
          }
        }
 else {
          int i=0;
          for (; i < ia.length; i++) {
            if (ia[i] == iStep) {
              break;
            }
          }
          if (i == 0) {
            if (icu <= info.iMinUnit) {
              return false;
            }
            ia=iaCalendarDeltas[icu - 1];
            i=ia.length;
            context.setUnit(Integer.valueOf(iaCalendarUnits[icu - 1]));
          }
          setStep(Integer.valueOf(ia[i - 1]));
          break;
        }
      }
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Zooms IN 'once' into a scale of type numerical or datetime Typically, this is called in a loop until label overlaps occur
 */
public final boolean zoomIn(){
  if (info.bStepFixed) {
    return false;
  }
  if (ChartUtil.mathEqual(0,((Number)context.getStep()).doubleValue())) {
    return false;
  }
  if ((info.type & NUMERICAL) == NUMERICAL) {
    if ((info.type & LOGARITHMIC) == LOGARITHMIC) {
      final double dStep=asDouble(context.getStep()).doubleValue();
      if ((Math.log(dStep) / LOG_10) > 1) {
        setStep(new Double(dStep / 10));
      }
 else {
        int n=iaLogarithmicDeltas.length;
        for (int i=n - 1; i >= 0; i--) {
          if ((int)dStep == iaLogarithmicDeltas[i]) {
            if (i > 0) {
              setStep(new Double(iaLogarithmicDeltas[i - 1]));
              return true;
            }
 else {
              return false;
            }
          }
        }
        return false;
      }
    }
 else     if ((info.type & LINEAR) == LINEAR) {
      double dStep=asDouble(context.getStep()).doubleValue();
      final double oldStep=dStep;
      double dPower=(Math.log(dStep) / LOG_10);
      dPower=Math.floor(dPower);
      dPower=Math.pow(10.0,dPower);
      dStep/=dPower;
      dStep=Math.round(dStep);
      int n=iaLinearDeltas.length;
      for (int i=0; i < n; i++) {
        if ((int)dStep == iaLinearDeltas[i]) {
          if (i > 0) {
            dStep=iaLinearDeltas[i - 1] * dPower;
          }
 else {
            dPower/=10;
            dStep=iaLinearDeltas[n - 2] * dPower;
          }
          break;
        }
      }
      if (ChartUtil.mathEqual(dStep,oldStep)) {
        dStep/=2;
      }
      setStep(new Double(dStep));
      if (((Number)context.getStep()).doubleValue() < info.dPrecision) {
        setStep(oldStep);
        return false;
      }
    }
  }
 else   if ((info.type & DATE_TIME) == DATE_TIME) {
    int[] ia=null;
    int iStep=asInteger(context.getStep());
    int iUnit=asInteger(context.getUnit());
    for (int icu=0; icu < iaCalendarUnits.length; icu++) {
      if (iUnit == iaCalendarUnits[icu]) {
        ia=iaCalendarDeltas[icu];
        if (ia == null) {
          iStep--;
          if (iStep == 0) {
            setStep(Integer.valueOf(iaMonthDeltas[iaMonthDeltas.length - 1]));
            context.setUnit(Integer.valueOf(Calendar.MONTH));
          }
        }
 else {
          int i=0;
          for (; i < ia.length; i++) {
            if (ia[i] == iStep) {
              break;
            }
          }
          if (i == 0) {
            if (icu <= info.iMinUnit) {
              return false;
            }
            ia=iaCalendarDeltas[icu - 1];
            i=ia.length;
            context.setUnit(Integer.valueOf(iaCalendarUnits[icu - 1]));
          }
          setStep(Integer.valueOf(ia[i - 1]));
          break;
        }
      }
    }
  }
  return true;
}