Program: 15176
Project: 15176
Buggy source:
@Override public void drawSeries(Canvas canvas,GraphViewData[] values,float graphwidth,float graphheight,float border,double minX,double minY,double diffX,double diffY,float horstart,GraphViewSeriesStyle style){
  double lastEndY=0;
  double lastEndX=0;
  if (drawBackground) {
    float startY=graphheight + border;
    for (int i=0; i < values.length; i++) {
      double valY=values[i].valueY - minY;
      double ratY=valY / diffY;
      double y=graphheight * ratY;
      double valX=values[i].valueX - minX;
      double ratX=valX / diffX;
      double x=graphwidth * ratX;
      float endX=(float)x + (horstart + 1);
      float endY=(float)(border - y) + graphheight + 2;
      if (i > 0) {
        int numSpace=(int)((endX - lastEndX) / 3f) + 1;
        for (int xi=0; xi < numSpace; xi++) {
          float spaceX=(float)(lastEndX + ((endX - lastEndX) * xi / (numSpace - 1)));
          float spaceY=(float)(lastEndY + ((endY - lastEndY) * xi / (numSpace - 1)));
          float startX=spaceX;
          if (startX - horstart > 1) {
            canvas.drawLine(startX,startY,spaceX,spaceY,paintBackground);
          }
        }
      }
      lastEndY=endY;
      lastEndX=endX;
    }
  }
  paint.setStrokeWidth(style.thickness);
  paint.setColor(style.color);
  lastEndY=0;
  lastEndX=0;
  for (int i=0; i < values.length; i++) {
    double valY=values[i].valueY - minY;
    double ratY=valY / diffY;
    double y=graphheight * ratY;
    double valX=values[i].valueX - minX;
    double ratX=valX / diffX;
    double x=graphwidth * ratX;
    if (i > 0) {
      float startX=(float)lastEndX + (horstart + 1);
      float startY=(float)(border - lastEndY) + graphheight;
      float endX=(float)x + (horstart + 1);
      float endY=(float)(border - y) + graphheight;
      canvas.drawLine(startX,startY,endX,endY,paint);
    }
    lastEndY=y;
    lastEndX=x;
  }
}

Fixed version (ground truth):
@Override public void drawSeries(Canvas canvas,GraphViewData[] values,float graphwidth,float graphheight,float border,double minX,double minY,double diffX,double diffY,float horstart,GraphViewSeriesStyle style){
  double lastEndY=0;
  double lastEndX=0;
  if (drawBackground) {
    float startY=graphheight + border;
    for (int i=0; i < values.length; i++) {
      double valY=values[i].valueY - minY;
      double ratY=valY / diffY;
      double y=graphheight * ratY;
      double valX=values[i].valueX - minX;
      double ratX=valX / diffX;
      double x=graphwidth * ratX;
      float endX=(float)x + (horstart + 1);
      float endY=(float)(border - y) + graphheight + 2;
      if (i > 0) {
        double numSpace=((endX - lastEndX) / 3f) + 1;
        for (int xi=0; xi < numSpace; xi++) {
          float spaceX=(float)(lastEndX + ((endX - lastEndX) * xi / (numSpace - 1)));
          float spaceY=(float)(lastEndY + ((endY - lastEndY) * xi / (numSpace - 1)));
          float startX=spaceX;
          if (startX - horstart > 1) {
            canvas.drawLine(startX,startY,spaceX,spaceY,paintBackground);
          }
        }
      }
      lastEndY=endY;
      lastEndX=endX;
    }
  }
  paint.setStrokeWidth(style.thickness);
  paint.setColor(style.color);
  lastEndY=0;
  lastEndX=0;
  for (int i=0; i < values.length; i++) {
    double valY=values[i].valueY - minY;
    double ratY=valY / diffY;
    double y=graphheight * ratY;
    double valX=values[i].valueX - minX;
    double ratX=valX / diffX;
    double x=graphwidth * ratX;
    if (i > 0) {
      float startX=(float)lastEndX + (horstart + 1);
      float startY=(float)(border - lastEndY) + graphheight;
      float endX=(float)x + (horstart + 1);
      float endY=(float)(border - y) + graphheight;
      canvas.drawLine(startX,startY,endX,endY,paint);
    }
    lastEndY=y;
    lastEndX=x;
  }
}