Program: 93280
Project: 93280
Buggy source:
/** 
 * Finds the segments of a line along which a name can be drawn and then adds WayTextContainers to the list of drawable items.
 * @param upperLeft     the tile in the upper left corner of the drawing pane
 * @param lowerRight    the tile in the lower right corner of the drawing pane
 * @param text          the text to draw
 * @param priority      priority of the text
 * @param dy            if 0, then a line  parallel to the coordinates will be calculated first
 * @param fill          fill paint for text
 * @param stroke        stroke paint for text
 * @param coordinates   the list of way coordinates
 * @param currentLabels the list of labels to which a new WayTextContainer will be added
 */
static void renderText(Tile upperLeft,Tile lowerRight,String text,Display display,int priority,float dy,Paint fill,Paint stroke,boolean repeat,float repeatGap,float repeatStart,boolean rotate,Point[][] coordinates,List<MapElementContainer> currentLabels){
  int wayNameWidth=(stroke == null) ? fill.getTextWidth(text) + (int)repeatStart : stroke.getTextWidth(text) + (int)repeatStart;
  double textHeight=(stroke == null) ? fill.getTextHeight(text) : stroke.getTextHeight(text);
  final Rectangle tileBoundary=Tile.getBoundaryAbsolute(upperLeft,lowerRight);
  int skipPixels=0;
  Point[] c;
  if (dy == 0f) {
    c=coordinates[0];
  }
 else {
    c=RendererUtils.parallelPath(coordinates[0],dy);
  }
  for (int i=1; i < c.length; ++i) {
    LineSegment currentSegment=new LineSegment(c[i - 1],c[i]);
    double currentLength=currentSegment.length();
    skipPixels-=currentLength;
    if (skipPixels > 0) {
      continue;
    }
    if (currentLength < wayNameWidth) {
      continue;
    }
    LineSegment drawableSegment=currentSegment.clipToRectangle(tileBoundary);
    if (drawableSegment == null) {
      continue;
    }
    double segmentLengthInPixel=drawableSegment.length();
    if (segmentLengthInPixel < wayNameWidth) {
      continue;
    }
    double offset=(segmentLengthInPixel - wayNameWidth) / 2d;
    LineSegment actuallyUsedSegment=drawableSegment.subSegment(offset,wayNameWidth - repeatStart);
    if (actuallyUsedSegment.start.x <= actuallyUsedSegment.end.x) {
      currentLabels.add(new WayTextContainer(actuallyUsedSegment.start,actuallyUsedSegment.end,display,priority,text,fill,stroke,textHeight));
    }
 else {
      currentLabels.add(new WayTextContainer(actuallyUsedSegment.end,actuallyUsedSegment.start,display,priority,text,fill,stroke,textHeight));
    }
    if (!repeat) {
      break;
    }
    skipPixels=(int)repeatGap;
  }
}

Fixed version (ground truth):
/** 
 * Finds the segments of a line along which a name can be drawn and then adds WayTextContainers to the list of drawable items.
 * @param upperLeft     the tile in the upper left corner of the drawing pane
 * @param lowerRight    the tile in the lower right corner of the drawing pane
 * @param text          the text to draw
 * @param priority      priority of the text
 * @param dy            if 0, then a line  parallel to the coordinates will be calculated first
 * @param fill          fill paint for text
 * @param stroke        stroke paint for text
 * @param coordinates   the list of way coordinates
 * @param currentLabels the list of labels to which a new WayTextContainer will be added
 */
static void renderText(Tile upperLeft,Tile lowerRight,String text,Display display,int priority,float dy,Paint fill,Paint stroke,boolean repeat,float repeatGap,float repeatStart,boolean rotate,Point[][] coordinates,List<MapElementContainer> currentLabels){
  int wayNameWidth=(stroke == null) ? fill.getTextWidth(text) + (int)repeatStart : stroke.getTextWidth(text) + (int)repeatStart;
  double textHeight=(stroke == null) ? fill.getTextHeight(text) : stroke.getTextHeight(text);
  final Rectangle tileBoundary=Tile.getBoundaryAbsolute(upperLeft,lowerRight);
  int skipPixels=0;
  Point[] c;
  if (dy == 0f) {
    c=coordinates[0];
  }
 else {
    c=RendererUtils.parallelPath(coordinates[0],dy);
  }
  for (int i=1; i < c.length; ++i) {
    LineSegment currentSegment=new LineSegment(c[i - 1],c[i]);
    double currentLength=currentSegment.length();
    skipPixels-=currentLength;
    if (skipPixels > 0) {
      continue;
    }
    if (currentLength < wayNameWidth) {
      continue;
    }
    LineSegment drawableSegment=currentSegment.clipToRectangle(tileBoundary);
    if (drawableSegment == null) {
      continue;
    }
    double segmentLengthInPixel=drawableSegment.length();
    if (segmentLengthInPixel < wayNameWidth) {
      continue;
    }
    double offset=(segmentLengthInPixel - wayNameWidth) / 2d;
    LineSegment actuallyUsedSegment=drawableSegment.subSegment(offset + repeatStart / 2,wayNameWidth - repeatStart);
    if (actuallyUsedSegment.start.x <= actuallyUsedSegment.end.x) {
      currentLabels.add(new WayTextContainer(actuallyUsedSegment.start,actuallyUsedSegment.end,display,priority,text,fill,stroke,textHeight));
    }
 else {
      currentLabels.add(new WayTextContainer(actuallyUsedSegment.end,actuallyUsedSegment.start,display,priority,text,fill,stroke,textHeight));
    }
    if (!repeat) {
      break;
    }
    skipPixels=(int)repeatGap;
  }
}