Program: 78435
Project: 78435
Buggy source:
/** 
 * @param ipr
 * @throws RenderingException
 */
public final void draw(IPrimitiveRenderer ipr) throws ChartException {
  if (!lia.isSetVisible()) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.RENDERING,"String_Node_Str",ResourceBundle.getBundle(Messages.ENGINE,iRender.getRunTimeContext().getLocale()));
  }
  if (!bFillArea && !lia.isVisible()) {
    return;
  }
  if (!((LineSeries)iRender.getSeries()).isConnectMissingValue()) {
    for (int i=0; i < loPoints.length; i++) {
      if (Double.isNaN(loPoints[i].getX()) || Double.isNaN(loPoints[i].getY())) {
        continue;
      }
      ArrayList al=new ArrayList();
      while ((i < loPoints.length) && !(Double.isNaN(loPoints[i].getX()) || Double.isNaN(loPoints[i].getY()))) {
        al.add(loPoints[i]);
        i+=1;
      }
      i-=1;
      if (loPoints instanceof Location3D[]) {
        tempPoints=(Location3D[])al.toArray(new Location3D[0]);
      }
 else {
        tempPoints=(Location[])al.toArray(new Location[0]);
      }
      faX=LocationImpl.getXArray(tempPoints);
      faY=LocationImpl.getYArray(tempPoints);
      if (bRendering3D) {
        faZ=Location3DImpl.getZArray((Location3D[])tempPoints);
      }
 else {
        faZ=null;
      }
      iNumberOfPoints=faX.length;
      if (iNumberOfPoints < 1) {
        return;
      }
 else       if (iNumberOfPoints == 1) {
        double iSize=(double)lia.getThickness();
        if (bRendering3D) {
          Line3DRenderEvent lre3dValue=(Line3DRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,Line3DRenderEvent.class);
          Location3D[] loa3dValue=new Location3D[2];
          loa3dValue[0]=Location3DImpl.create(faX[0],faY[0],faZ[0]);
          loa3dValue[1]=Location3DImpl.create(faX[0],faY[0],faZ[0] - dTapeWidth);
          lre3dValue.setStart3D(loa3dValue[0]);
          lre3dValue.setEnd3D(loa3dValue[1]);
          lre3dValue.setLineAttributes(lia);
          dc.addLine(lre3dValue);
        }
 else {
          final OvalRenderEvent ore=(OvalRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,OvalRenderEvent.class);
          ore.setBounds(BoundsImpl.create(faX[0] - iSize,faY[0] - iSize,2 * iSize,2 * iSize));
          ore.setOutline(lia);
          ipr.drawOval(ore);
        }
      }
 else {
        spX=new Spline(faX);
        spY=new Spline(faY);
        fa=new double[iNumberOfPoints];
        for (int j=0; j < iNumberOfPoints; j++) {
          fa[j]=j;
        }
        renderCurve(ipr,0,0);
      }
    }
  }
 else {
    tempPoints=filterNull(loPoints);
    faX=LocationImpl.getXArray(tempPoints);
    faY=LocationImpl.getYArray(tempPoints);
    if (bRendering3D) {
      faZ=Location3DImpl.getZArray((Location3D[])tempPoints);
    }
 else {
      faZ=null;
    }
    iNumberOfPoints=faX.length;
    if (iNumberOfPoints <= 1) {
      return;
    }
    spX=new Spline(faX);
    spY=new Spline(faY);
    fa=new double[iNumberOfPoints];
    for (int i=0; i < iNumberOfPoints; i++) {
      fa[i]=i;
    }
    renderCurve(ipr,0,0);
  }
}

Fixed version (ground truth):
/** 
 * @param ipr
 * @throws RenderingException
 */
public final void draw(IPrimitiveRenderer ipr) throws ChartException {
  if (!lia.isSetVisible()) {
    throw new ChartException(ChartEnginePlugin.ID,ChartException.RENDERING,"String_Node_Str",ResourceBundle.getBundle(Messages.ENGINE,iRender.getRunTimeContext().getLocale()));
  }
  if (!bFillArea && !lia.isVisible()) {
    return;
  }
  if (!bConnectMissingValue) {
    for (int i=0; i < loPoints.length; i++) {
      if (Double.isNaN(loPoints[i].getX()) || Double.isNaN(loPoints[i].getY())) {
        continue;
      }
      ArrayList al=new ArrayList();
      while ((i < loPoints.length) && !(Double.isNaN(loPoints[i].getX()) || Double.isNaN(loPoints[i].getY()))) {
        al.add(loPoints[i]);
        i+=1;
      }
      i-=1;
      if (loPoints instanceof Location3D[]) {
        tempPoints=(Location3D[])al.toArray(new Location3D[0]);
      }
 else {
        tempPoints=(Location[])al.toArray(new Location[0]);
      }
      faX=LocationImpl.getXArray(tempPoints);
      faY=LocationImpl.getYArray(tempPoints);
      if (bRendering3D) {
        faZ=Location3DImpl.getZArray((Location3D[])tempPoints);
      }
 else {
        faZ=null;
      }
      iNumberOfPoints=faX.length;
      if (iNumberOfPoints < 1) {
        return;
      }
 else       if (iNumberOfPoints == 1) {
        double iSize=(double)lia.getThickness();
        if (bRendering3D) {
          Line3DRenderEvent lre3dValue=(Line3DRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,Line3DRenderEvent.class);
          Location3D[] loa3dValue=new Location3D[2];
          loa3dValue[0]=Location3DImpl.create(faX[0],faY[0],faZ[0]);
          loa3dValue[1]=Location3DImpl.create(faX[0],faY[0],faZ[0] - dTapeWidth);
          lre3dValue.setStart3D(loa3dValue[0]);
          lre3dValue.setEnd3D(loa3dValue[1]);
          lre3dValue.setLineAttributes(lia);
          dc.addLine(lre3dValue);
        }
 else {
          final OvalRenderEvent ore=(OvalRenderEvent)((EventObjectCache)ipr).getEventObject(oSource,OvalRenderEvent.class);
          ore.setBounds(BoundsImpl.create(faX[0] - iSize,faY[0] - iSize,2 * iSize,2 * iSize));
          ore.setOutline(lia);
          ipr.drawOval(ore);
        }
      }
 else {
        spX=new Spline(faX);
        spY=new Spline(faY);
        fa=new double[iNumberOfPoints];
        for (int j=0; j < iNumberOfPoints; j++) {
          fa[j]=j;
        }
        renderCurve(ipr,0,0);
      }
    }
  }
 else {
    tempPoints=filterNull(loPoints);
    faX=LocationImpl.getXArray(tempPoints);
    faY=LocationImpl.getYArray(tempPoints);
    if (bRendering3D) {
      faZ=Location3DImpl.getZArray((Location3D[])tempPoints);
    }
 else {
      faZ=null;
    }
    iNumberOfPoints=faX.length;
    if (iNumberOfPoints <= 1) {
      return;
    }
    spX=new Spline(faX);
    spY=new Spline(faY);
    fa=new double[iNumberOfPoints];
    for (int i=0; i < iNumberOfPoints; i++) {
      fa[i]=i;
    }
    renderCurve(ipr,0,0);
  }
}