Program: 116924
Project: 116924
Buggy source:
@Override public void dispatchDraw(Canvas c){
  super.dispatchDraw(c);
  Paint p=new Paint();
  p.setColor(getResources().getColor(R.color.ReserveLine));
  int startCenterX=getWidth() / 4;
  int endCenterX=getWidth() / 4 * 3;
  int w=10;
  int left=0;
  int bottom=durationLabel.getTop();
  int right=getWidth();
  int y=0;
  final int padding=durationLabel.getTop() / 6;
  c.drawLine(startCenterX - w,y,startCenterX + w,y,p);
  c.drawLine(endCenterX - w,y,endCenterX + w,y,p);
  c.drawLine(startCenterX,y,startCenterX,y + padding + 1,p);
  c.drawLine(endCenterX,y,endCenterX,y + padding * 2 + 1,p);
  y+=padding;
  int width=getWidth();
  int startX=(int)(width * getProportional(span.getStart()));
  int endX=(int)(width * getProportional(span.getEnd()));
  c.drawLine(startCenterX,y,startX,y,p);
  c.drawLine(endCenterX,y + padding,endX,y + padding,p);
  c.drawLine(startX,y,startX,bottom,p);
  c.drawLine(endX,y + padding,endX,bottom,p);
  y+=2 * padding;
  background.setBounds(left,y,right,bottom);
  background.draw(c);
  reservationOwn.setBounds(startX,y,endX,bottom);
  reservationOwn.draw(c);
  if (span.getLength() < MIN_SPAN_LENGTH) {
    reservationOther.setBounds((int)(width * getProportional(limits.getEnd())),y,width,bottom);
    reservationOther.draw(c);
  }
  p.setStyle(Style.STROKE);
  p.setColor(tickColor);
  DateTime time=limits.getStart();
  DateTime end=getMaximum();
  while (time.before(end)) {
    if (time.get(Calendar.MINUTE) % 30 != 0) {
      time=time.add(Calendar.MINUTE,30 - time.get(Calendar.MINUTE) % 30);
    }
    int x=(int)(width * getProportional(time));
    c.drawLine(x,y,x,bottom,p);
    time=time.add(Calendar.MINUTE,30);
  }
  durationLabel.setText(span.getLength() / 60000 + "String_Node_Str");
}

Fixed version (ground truth):
@Override public void dispatchDraw(Canvas c){
  super.dispatchDraw(c);
  int startCenterX=getWidth() / 4;
  int endCenterX=getWidth() / 4 * 3;
  int w=10;
  int left=0;
  int bottom=durationLabel.getTop();
  int right=getWidth() - 1;
  int y=0;
  final int padding=durationLabel.getTop() / 6;
  Paint p=new Paint();
  p.setColor(getResources().getColor(R.color.ReserveLine));
  c.drawLine(startCenterX - w,y,startCenterX + w,y,p);
  c.drawLine(endCenterX - w,y,endCenterX + w,y,p);
  c.drawLine(startCenterX,y,startCenterX,y + padding + 1,p);
  c.drawLine(endCenterX,y,endCenterX,y + padding * 2 + 1,p);
  y+=padding;
  int width=getWidth() - 1;
  int startX=(int)(width * getProportional(span.getStart()));
  int endX=(int)(width * getProportional(span.getEnd()));
  c.drawLine(startCenterX,y,startX,y,p);
  c.drawLine(endCenterX,y + padding,endX,y + padding,p);
  c.drawLine(startX,y,startX,bottom,p);
  c.drawLine(endX,y + padding,endX,bottom,p);
  y+=2 * padding;
  background.setBounds(left,y,right,bottom);
  background.draw(c);
  reservationOwn.setBounds(startX,y,endX,bottom);
  reservationOwn.draw(c);
  if (span.getLength() < MIN_SPAN_LENGTH) {
    reservationOther.setBounds((int)(width * getProportional(limits.getEnd())),y,width,bottom);
    reservationOther.draw(c);
  }
  p.setStyle(Style.STROKE);
  p.setColor(tickColor);
  DateTime time=limits.getStart();
  DateTime end=getMaximum();
  if (time.get(Calendar.MINUTE) % 30 == 0) {
    time=time.set(Calendar.MINUTE,(time.get(Calendar.MINUTE) % 30) * 30);
  }
  time=time.add(Calendar.MINUTE,30);
  while (time.before(end)) {
    int x=(int)(width * getProportional(time));
    c.drawLine(x,y,x,bottom,p);
    time=time.add(Calendar.MINUTE,30);
  }
  durationLabel.setText(span.getLength() / 60000 + "String_Node_Str");
}