Program: 68869
Project: 68869
Buggy source:
public void decorateAxes(IPrimitiveRenderer ipr,ISeriesRenderingHints isrh,OneAxis ax) throws ChartException {
  GanttSeries gs=(GanttSeries)getSeries();
  Label la=gs.getDecorationLabel();
  if (la == null || !la.isVisible()) {
    return;
  }
  final AutoScale as=ax.getScale();
  final DataPointHints[] dpha=isrh.getDataPoints();
  final AxisTickCoordinates tickCoords=as.getTickCordinates();
  final String[] lba=new String[tickCoords.size() - 1];
  final boolean bTransposed=isTransposed();
  for (int i=0; i < dpha.length; i++) {
    Location loc=dpha[i].getLocation();
    double dv=bTransposed ? loc.getY() : loc.getX();
    int idx=tickCoords.getTickSlot(dv);
    if (idx >= 0 && idx < lba.length && lba[idx] == null) {
      GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
      if (isValidGanttEntry(ge) && ge.getStart() != null && ge.getEnd() != null) {
        lba[idx]=ge.getLabel();
      }
    }
  }
  int pos=transposePosition(gs.getDecorationLabelPosition()).getValue();
  int iOrientation=ax.getOrientation();
  if (iOrientation == IConstants.VERTICAL) {
    if (pos == Position.LEFT) {
      pos=IConstants.LEFT;
    }
 else {
      pos=IConstants.RIGHT;
    }
  }
 else {
    if (pos == Position.BELOW) {
      pos=IConstants.BELOW;
    }
 else {
      pos=IConstants.ABOVE;
    }
  }
  la=goFactory.copyOf(la);
  Location loLabel=goFactory.createLocation(0,0);
  final double axisCoord=ax.getAxisCoordinate();
  final int iMajorTickStyle=ax.getGrid().getTickStyle(IConstants.MAJOR);
  double dXTick1=((iMajorTickStyle & IConstants.TICK_LEFT) == IConstants.TICK_LEFT) ? (axisCoord - IConstants.TICK_SIZE - 1) : (axisCoord - 1);
  double dXTick2=((iMajorTickStyle & IConstants.TICK_RIGHT) == IConstants.TICK_RIGHT) ? (axisCoord + IConstants.TICK_SIZE + 1) : (axisCoord + 1);
  TextRenderEvent tre;
  for (int i=0; i < tickCoords.size() - 1; i++) {
    if (lba[i] != null) {
      la.getCaption().setValue(lba[i]);
      double point=tickCoords.getCoordinate(i);
      if (!(as.isCategoryScale() && !as.isTickBetweenCategories() && i == 0)) {
        point+=tickCoords.getStep() / 2;
      }
      if (iOrientation == IConstants.VERTICAL) {
        if (pos == IConstants.LEFT) {
          loLabel.setX(dXTick1);
        }
 else {
          loLabel.setX(dXTick2);
        }
        loLabel.setY(point);
      }
 else {
        loLabel.setX(point);
        if (pos == IConstants.ABOVE) {
          loLabel.setY(dXTick1);
        }
 else {
          loLabel.setY(dXTick2);
        }
      }
      tre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(ax.getModelAxis()),TextRenderEvent.class);
      tre.setTextPosition(pos);
      tre.setLocation(loLabel);
      tre.setLabel(la);
      tre.setAction(TextRenderEvent.RENDER_TEXT_AT_LOCATION);
      ipr.drawText(tre);
    }
  }
}

Fixed version (ground truth):
public void decorateAxes(IPrimitiveRenderer ipr,ISeriesRenderingHints isrh,OneAxis ax) throws ChartException {
  GanttSeries gs=(GanttSeries)getSeries();
  Label la=gs.getDecorationLabel();
  if (la == null || !la.isVisible()) {
    return;
  }
  final DataPointHints[] dpha=isrh.getDataPoints();
  SeriesRenderingHints srh=(SeriesRenderingHints)isrh;
  int pos=transposePosition(gs.getDecorationLabelPosition()).getValue();
  int iOrientation=ax.getOrientation();
  if (iOrientation == IConstants.VERTICAL) {
    if (pos == Position.LEFT) {
      pos=IConstants.LEFT;
    }
 else {
      pos=IConstants.RIGHT;
    }
  }
 else {
    if (pos == Position.BELOW) {
      pos=IConstants.BELOW;
    }
 else {
      pos=IConstants.ABOVE;
    }
  }
  la=goFactory.copyOf(la);
  Location loLabel=goFactory.createLocation(0,0);
  final double axisCoord=ax.getAxisCoordinate();
  final int iMajorTickStyle=ax.getGrid().getTickStyle(IConstants.MAJOR);
  double dXTick1=((iMajorTickStyle & IConstants.TICK_LEFT) == IConstants.TICK_LEFT) ? (axisCoord - IConstants.TICK_SIZE - 1) : (axisCoord - 1);
  double dXTick2=((iMajorTickStyle & IConstants.TICK_RIGHT) == IConstants.TICK_RIGHT) ? (axisCoord + IConstants.TICK_SIZE + 1) : (axisCoord + 1);
  TextRenderEvent tre;
  if (iOrientation == IConstants.VERTICAL) {
    if (pos == IConstants.LEFT) {
      loLabel.setX(dXTick1);
    }
 else {
      loLabel.setX(dXTick2);
    }
  }
 else {
    if (pos == IConstants.ABOVE) {
      loLabel.setY(dXTick1);
    }
 else {
      loLabel.setY(dXTick2);
    }
  }
  for (int i=0; i < dpha.length; i++) {
    GanttEntry ge=(GanttEntry)dpha[i].getOrthogonalValue();
    if (isValidGanttEntry(ge) && ge.getLabel() != null && ge.getStart() != null && ge.getEnd() != null) {
      la.getCaption().setValue(ge.getLabel());
      double fSize=srh.isCategoryScale() ? dpha[i].getSize() / 2 : 0;
      if (iOrientation == IConstants.VERTICAL) {
        loLabel.setY(dpha[i].getLocation().getY() + fSize);
      }
 else {
        loLabel.setX(dpha[i].getLocation().getX() + fSize);
      }
      tre=((EventObjectCache)ipr).getEventObject(StructureSource.createAxis(ax.getModelAxis()),TextRenderEvent.class);
      tre.setTextPosition(pos);
      tre.setLocation(loLabel);
      tre.setLabel(la);
      tre.setAction(TextRenderEvent.RENDER_TEXT_AT_LOCATION);
      ipr.drawText(tre);
    }
  }
}