Program: 76648
Project: 76648
Buggy source:
/** 
 * Checks out-of-range of each data point. If outside data is visible, adjust the coordinates; otherwise, clip the plot area. Note that coordinates array may be modified.
 * @param ipr renderer
 * @param srh SeriesRenderingHints
 * @param faX X coordinates
 * @param faY Y coordinates
 * @param bShowAsTape indicates if it's 2d+ chart
 */
protected final void handleOutsideDataPoints(final IPrimitiveRenderer ipr,final SeriesRenderingHints srh,final double[] faX,final double[] faY,final boolean bShowAsTape){
  final AutoScale scale=getAxisInternal().getScale();
  if ((scale.getType() & IConstants.PERCENT) == IConstants.PERCENT) {
    return;
  }
  final boolean bHideOutside=!getAxis().getScale().isShowOutside();
  final DataPointHints[] dpha=srh.getDataPoints();
  final boolean isCategory=srh.isCategoryScale();
  final Bounds boClientArea=srh.getClientAreaBounds(true);
  if (bShowAsTape) {
    final double dSeriesThickness=srh.getSeriesThickness();
    boClientArea.delta(-dSeriesThickness,dSeriesThickness,0,0);
  }
  renderClipping(ipr,boClientArea);
  for (int i=0; i < dpha.length; i++) {
    if (!isCategory && dpha[i].getBaseValue() == null) {
      dpha[i].markOutside();
      continue;
    }
    int iOutside=0;
    if (dpha[i].getStackOrthogonalValue() != null) {
      double value=dpha[i].getStackOrthogonalValue().doubleValue();
      double min=Methods.asDouble(scale.getMinimum()).doubleValue();
      double max=Methods.asDouble(scale.getMaximum()).doubleValue();
      if (value < min) {
        iOutside=1;
      }
 else       if (value > max) {
        iOutside=2;
      }
    }
 else     if (dpha[i].getOrthogonalValue() == null) {
      iOutside=1;
    }
 else     if (dpha[i].getOrthogonalValue() instanceof Double) {
      double value=((Double)dpha[i].getOrthogonalValue()).doubleValue();
      double min=Methods.asDouble(scale.getMinimum()).doubleValue();
      double max=Methods.asDouble(scale.getMaximum()).doubleValue();
      if (value < min) {
        iOutside=1;
      }
 else       if (value > max) {
        iOutside=2;
      }
    }
 else     if (dpha[i].getOrthogonalValue() instanceof CDateTime) {
      CDateTime value=(CDateTime)dpha[i].getOrthogonalValue();
      CDateTime min=Methods.asDateTime(scale.getMinimum());
      CDateTime max=Methods.asDateTime(scale.getMaximum());
      if (value.before(min)) {
        iOutside=1;
      }
 else       if (value.after(max)) {
        iOutside=2;
      }
    }
 else {
      iOutside=checkEntryInRange(dpha[i].getOrthogonalValue(),scale.getMinimum(),scale.getMaximum());
    }
    if (iOutside > 0) {
      if (bHideOutside) {
        dpha[i].markOutside();
      }
 else {
        if (isTransposed()) {
          faX[i]=iOutside == 1 ? boClientArea.getLeft() : boClientArea.getLeft() + boClientArea.getWidth();
        }
 else {
          faY[i]=iOutside == 1 ? boClientArea.getTop() + boClientArea.getHeight() : boClientArea.getTop();
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks out-of-range of each data point. If outside data is visible, adjust the coordinates; otherwise, clip the plot area. Note that coordinates array may be modified.
 * @param ipr renderer
 * @param srh SeriesRenderingHints
 * @param faX X coordinates
 * @param faY Y coordinates
 * @param bShowAsTape indicates if it's 2d+ chart
 */
protected final void handleOutsideDataPoints(final IPrimitiveRenderer ipr,final SeriesRenderingHints srh,final double[] faX,final double[] faY,final boolean bShowAsTape){
  final AutoScale scale=getAxisInternal().getScale();
  if ((scale.getType() & IConstants.PERCENT) == IConstants.PERCENT) {
    return;
  }
  final boolean bHideOutside=!getAxis().getScale().isShowOutside();
  final DataPointHints[] dpha=srh.getDataPoints();
  final boolean isCategory=srh.isCategoryScale();
  final boolean bTransposed=isTransposed();
  final Bounds boClientArea=srh.getClientAreaBounds(true);
  if (bShowAsTape) {
    final double dSeriesThickness=srh.getSeriesThickness();
    boClientArea.delta(-dSeriesThickness,dSeriesThickness,0,0);
  }
  renderClipping(ipr,boClientArea);
  for (int i=0; i < dpha.length; i++) {
    if (!isCategory && dpha[i].getBaseValue() == null) {
      dpha[i].markOutside();
      continue;
    }
    int iOutside=0;
    if (dpha[i].getStackOrthogonalValue() != null) {
      double value=dpha[i].getStackOrthogonalValue().doubleValue();
      double min=Methods.asDouble(scale.getMinimum()).doubleValue();
      double max=Methods.asDouble(scale.getMaximum()).doubleValue();
      if (value < min) {
        iOutside=1;
      }
 else       if (value > max) {
        iOutside=2;
      }
    }
 else     if (dpha[i].getOrthogonalValue() == null) {
      iOutside=1;
    }
 else     if (dpha[i].getOrthogonalValue() instanceof Double) {
      double value=((Double)dpha[i].getOrthogonalValue()).doubleValue();
      double min=Methods.asDouble(scale.getMinimum()).doubleValue();
      double max=Methods.asDouble(scale.getMaximum()).doubleValue();
      if (value < min) {
        iOutside=1;
      }
 else       if (value > max) {
        iOutside=2;
      }
    }
 else     if (dpha[i].getOrthogonalValue() instanceof CDateTime) {
      CDateTime value=(CDateTime)dpha[i].getOrthogonalValue();
      CDateTime min=Methods.asDateTime(scale.getMinimum());
      CDateTime max=Methods.asDateTime(scale.getMaximum());
      if (value.before(min)) {
        iOutside=1;
      }
 else       if (value.after(max)) {
        iOutside=2;
      }
    }
 else {
      iOutside=checkEntryInRange(dpha[i].getOrthogonalValue(),scale.getMinimum(),scale.getMaximum());
    }
    if (iOutside > 0) {
      if (bHideOutside) {
        dpha[i].markOutside();
      }
 else {
        if (bTransposed) {
          if (!Double.isNaN(faX[i])) {
            faX[i]=iOutside == 1 ? boClientArea.getLeft() : boClientArea.getLeft() + boClientArea.getWidth();
          }
        }
 else {
          if (!Double.isNaN(faY[i])) {
            faY[i]=iOutside == 1 ? boClientArea.getTop() + boClientArea.getHeight() : boClientArea.getTop();
          }
        }
      }
    }
  }
}