Program: 18923
Project: 18923
Buggy source:
/** 
 * draws the given y values to the screen
 */
@Override protected void drawData(){
  ArrayList<LineDataSet> dataSets=(ArrayList<LineDataSet>)mCurrentData.getDataSets();
  mRenderPaint.setStyle(Paint.Style.STROKE);
  for (int i=0; i < mCurrentData.getDataSetCount(); i++) {
    LineDataSet dataSet=dataSets.get(i);
    ArrayList<Entry> entries=dataSet.getYVals();
    float[] valuePoints=generateTransformedValues(entries,0f);
    mRenderPaint.setStrokeWidth(dataSet.getLineWidth());
    mRenderPaint.setPathEffect(dataSet.getDashPathEffect());
    if (mDrawCubic) {
      mRenderPaint.setColor(dataSet.getColor(i));
      Path spline=new Path();
      spline.moveTo(entries.get(0).getXIndex(),entries.get(0).getVal());
      for (int x=1; x < entries.size() - 3; x+=2) {
        spline.cubicTo(entries.get(x).getXIndex(),entries.get(x).getVal(),entries.get(x + 1).getXIndex(),entries.get(x + 1).getVal(),entries.get(x + 2).getXIndex(),entries.get(x + 2).getVal());
      }
      transformPath(spline);
      mDrawCanvas.drawPath(spline,mRenderPaint);
    }
 else {
      for (int j=0; j < (valuePoints.length - 2) * mPhaseX; j+=2) {
        mRenderPaint.setColor(dataSet.getColor(j));
        if (isOffContentRight(valuePoints[j]))         break;
        if (j != 0 && isOffContentLeft(valuePoints[j - 1]) && isOffContentTop(valuePoints[j + 1]) && isOffContentBottom(valuePoints[j + 1]))         continue;
        mDrawCanvas.drawLine(valuePoints[j],valuePoints[j + 1],valuePoints[j + 2],valuePoints[j + 3],mRenderPaint);
      }
    }
    mRenderPaint.setPathEffect(null);
    if (dataSet.isDrawFilledEnabled() && entries.size() > 0) {
      mRenderPaint.setStyle(Paint.Style.FILL);
      mRenderPaint.setAlpha(85);
      Path filled=generateFilledPath(entries);
      transformPath(filled);
      mDrawCanvas.drawPath(filled,mRenderPaint);
      mRenderPaint.setAlpha(255);
    }
  }
}

Fixed version (ground truth):
/** 
 * draws the given y values to the screen
 */
@Override protected void drawData(){
  ArrayList<LineDataSet> dataSets=(ArrayList<LineDataSet>)mCurrentData.getDataSets();
  mRenderPaint.setStyle(Paint.Style.STROKE);
  for (int i=0; i < mCurrentData.getDataSetCount(); i++) {
    LineDataSet dataSet=dataSets.get(i);
    ArrayList<Entry> entries=dataSet.getYVals();
    float[] valuePoints=generateTransformedValues(entries,0f);
    mRenderPaint.setStrokeWidth(dataSet.getLineWidth());
    mRenderPaint.setPathEffect(dataSet.getDashPathEffect());
    if (mDrawCubic) {
      mRenderPaint.setColor(dataSet.getColor(i));
      Path spline=new Path();
      spline.moveTo(entries.get(0).getXIndex(),entries.get(0).getVal());
      for (int x=1; x < entries.size() - 3; x+=2) {
        spline.cubicTo(entries.get(x).getXIndex(),entries.get(x).getVal(),entries.get(x + 1).getXIndex(),entries.get(x + 1).getVal(),entries.get(x + 2).getXIndex(),entries.get(x + 2).getVal());
      }
      transformPath(spline);
      mDrawCanvas.drawPath(spline,mRenderPaint);
    }
 else {
      for (int j=0; j < (valuePoints.length - 2) * mPhaseX; j+=2) {
        mRenderPaint.setColor(dataSet.getColor(j / 2));
        if (isOffContentRight(valuePoints[j]))         break;
        if (j != 0 && isOffContentLeft(valuePoints[j - 1]) && isOffContentTop(valuePoints[j + 1]) && isOffContentBottom(valuePoints[j + 1]))         continue;
        mDrawCanvas.drawLine(valuePoints[j],valuePoints[j + 1],valuePoints[j + 2],valuePoints[j + 3],mRenderPaint);
      }
    }
    mRenderPaint.setPathEffect(null);
    if (dataSet.isDrawFilledEnabled() && entries.size() > 0) {
      mRenderPaint.setStyle(Paint.Style.FILL);
      mRenderPaint.setAlpha(85);
      Path filled=generateFilledPath(entries);
      transformPath(filled);
      mDrawCanvas.drawPath(filled,mRenderPaint);
      mRenderPaint.setAlpha(255);
    }
  }
}