Program: 26626
Project: 26626
Buggy source:
/** 
 * Draws the LimitLines associated with this axis to the screen.
 * @param c
 */
public void renderLimitLines(Canvas c){
  ArrayList<LimitLine> limitLines=mYAxis.getLimitLines();
  if (limitLines == null || limitLines.size() <= 0)   return;
  float[] pts=new float[4];
  for (int i=0; i < limitLines.size(); i++) {
    LimitLine l=limitLines.get(i);
    pts[1]=l.getLimit();
    pts[3]=l.getLimit();
    mTrans.pointValuesToPixel(pts);
    pts[0]=mViewPortHandler.contentLeft();
    pts[2]=mViewPortHandler.contentRight();
    mLimitLinePaint.setColor(l.getLineColor());
    mLimitLinePaint.setPathEffect(l.getDashPathEffect());
    mLimitLinePaint.setStrokeWidth(l.getLineWidth());
    c.drawLines(pts,mLimitLinePaint);
    String label=l.getLabel();
    if (label != null && !label.equals("String_Node_Str")) {
      float xOffset=Utils.convertDpToPixel(4f);
      float yOffset=l.getLineWidth() + Utils.calcTextHeight(mLimitLinePaint,label) / 2f;
      mLimitLinePaint.setPathEffect(null);
      mLimitLinePaint.setColor(l.getTextColor());
      mLimitLinePaint.setStrokeWidth(0.5f);
      mLimitLinePaint.setTextSize(l.getTextSize());
      if (l.getLabelPosition() == LimitLabelPosition.POS_RIGHT) {
        mLimitLinePaint.setTextAlign(Align.RIGHT);
        c.drawText(label,mViewPortHandler.contentRight() - xOffset,pts[1] - yOffset,mLimitLinePaint);
      }
 else {
        mLimitLinePaint.setTextAlign(Align.LEFT);
        c.drawText(label,mViewPortHandler.offsetLeft() + xOffset,pts[1] - yOffset,mLimitLinePaint);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Draws the LimitLines associated with this axis to the screen.
 * @param c
 */
public void renderLimitLines(Canvas c){
  ArrayList<LimitLine> limitLines=mYAxis.getLimitLines();
  if (limitLines == null || limitLines.size() <= 0)   return;
  float[] pts=new float[4];
  Path limitLinePath=new Path();
  for (int i=0; i < limitLines.size(); i++) {
    LimitLine l=limitLines.get(i);
    pts[1]=l.getLimit();
    pts[3]=l.getLimit();
    mTrans.pointValuesToPixel(pts);
    pts[0]=mViewPortHandler.contentLeft();
    pts[2]=mViewPortHandler.contentRight();
    limitLinePath.moveTo(pts[0],pts[1]);
    limitLinePath.lineTo(pts[2],pts[3]);
    mLimitLinePaint.setColor(l.getLineColor());
    mLimitLinePaint.setPathEffect(l.getDashPathEffect());
    mLimitLinePaint.setStrokeWidth(l.getLineWidth());
    c.drawPath(limitLinePath,mLimitLinePaint);
    limitLinePath.reset();
    String label=l.getLabel();
    if (label != null && !label.equals("String_Node_Str")) {
      float xOffset=Utils.convertDpToPixel(4f);
      float yOffset=l.getLineWidth() + Utils.calcTextHeight(mLimitLinePaint,label) / 2f;
      mLimitLinePaint.setPathEffect(null);
      mLimitLinePaint.setColor(l.getTextColor());
      mLimitLinePaint.setStrokeWidth(0.5f);
      mLimitLinePaint.setTextSize(l.getTextSize());
      if (l.getLabelPosition() == LimitLabelPosition.POS_RIGHT) {
        mLimitLinePaint.setTextAlign(Align.RIGHT);
        c.drawText(label,mViewPortHandler.contentRight() - xOffset,pts[1] - yOffset,mLimitLinePaint);
      }
 else {
        mLimitLinePaint.setTextAlign(Align.LEFT);
        c.drawText(label,mViewPortHandler.offsetLeft() + xOffset,pts[1] - yOffset,mLimitLinePaint);
      }
    }
  }
}