Program: 73135
Project: 73135
Buggy source:
/** 
 * Tell the connector to route itself between the current positions of the head and tail sites. If bend points are available, draw the line with these instead. Delete bend point information if modification detected (i.e., movement of one or the other end of a link).
 */
public void route(){
  List<Point2D> bendPointList=null;
  Object object=this.getUserObject();
  Link link=null;
  Relation relation=null;
  LayoutHintItem layoutHintItem=null;
  boolean considerBendPoints=false;
  if (object instanceof Link) {
    link=(Link)object;
    relation=link.getRelation();
    if (relation != null) {
      LayoutHint layoutHint=(LayoutHint)relation.getAttribute("String_Node_Str");
      if (layoutHint != null) {
        layoutHintItem=layoutHint.getLayoutHintItem(link.getHead(),link.getTail());
        if (layoutHintItem != null) {
          considerBendPoints=KielerLayout.isLayoutInProgress() || layoutHintItem.revalidate();
          if (considerBendPoints) {
            bendPointList=layoutHintItem.getBendPointList();
          }
 else {
            layoutHint.removeLayoutHintItem(layoutHintItem);
          }
        }
      }
    }
  }
  if (considerBendPoints) {
    repaint();
    GeneralPath path=new GeneralPath();
    Point2D[] startEnd=_getHeadTailPoints(bendPointList);
    double startX=startEnd[0].getX();
    double startY=startEnd[0].getY();
    double previousX=startX;
    double previousY=startY;
    double endX=startEnd[1].getX();
    double endY=startEnd[1].getY();
    path.moveTo((float)startX,(float)startY);
    bendPointList.add(0,new Point2D.Double(startX,startY));
    bendPointList.add(new Point2D.Double(endX,endY));
    for (int i=1; i <= bendPointList.size() - 1; i++) {
      int i1=i;
      int i0=i - 1;
      if (i0 < 0) {
        i0=0;
      }
      if (i0 > bendPointList.size() - 1) {
        i0=bendPointList.size() - 1;
      }
      double x0=previousX;
      double y0=previousY;
      double x1=bendPointList.get(i0).getX();
      double y1=bendPointList.get(i0).getY();
      double x2=bendPointList.get(i1).getX();
      double y2=bendPointList.get(i1).getY();
      x2=(x1 + x2) / 2;
      y2=(y1 + y2) / 2;
      double d0=Math.sqrt(((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0)));
      double d1=Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
      double r=Math.min(_bendRadius,d0);
      r=Math.min(r,d1);
      if ((d0 == 0.0) || (d1 == 0.0)) {
        path.lineTo((float)x1,(float)y1);
      }
 else {
        double intX0=x1 + ((r / d0) * (x0 - x1));
        double intY0=y1 + ((r / d0) * (y0 - y1));
        double intX1=x1 + ((r / d1) * (x2 - x1));
        double intY1=y1 + ((r / d1) * (y2 - y1));
        path.lineTo((float)intX0,(float)intY0);
        path.curveTo((float)x1,(float)y1,(float)x1,(float)y1,(float)intX1,(float)intY1);
        previousX=x2;
        previousY=y2;
      }
    }
    path.lineTo((float)endX,(float)endY);
    setShape(path);
    int count=bendPointList.size();
    Point2D point1=bendPointList.get(count / 2 - 1);
    Point2D point2=bendPointList.get(count / 2);
    _labelLocation=(new Point2D.Double((point1.getX() + point2.getX()) / 2,(point1.getY() + point2.getY()) / 2));
    repositionLabel();
    repaint();
  }
 else {
    super.route();
  }
}

Fixed version (ground truth):
/** 
 * Tell the connector to route itself between the current positions of the head and tail sites. If bend points are available, draw the line with these instead. Delete bend point information if modification detected (i.e., movement of one or the other end of a link).
 */
public void route(){
  List<Point2D> bendPointList=null;
  Object object=this.getUserObject();
  Link link=null;
  Relation relation=null;
  LayoutHintItem layoutHintItem=null;
  boolean considerBendPoints=false;
  if (object instanceof Link) {
    link=(Link)object;
    relation=link.getRelation();
    if (relation != null) {
      LayoutHint layoutHint=(LayoutHint)relation.getAttribute("String_Node_Str");
      if (layoutHint != null) {
        layoutHintItem=layoutHint.getLayoutHintItem(link.getHead(),link.getTail());
        if (layoutHintItem != null) {
          considerBendPoints=_layoutInProgress || layoutHintItem.revalidate();
          if (considerBendPoints) {
            bendPointList=layoutHintItem.getBendPointList();
          }
 else {
            layoutHint.removeLayoutHintItem(layoutHintItem);
          }
        }
      }
    }
  }
  if (considerBendPoints) {
    repaint();
    GeneralPath path=new GeneralPath();
    Point2D[] startEnd=_getHeadTailPoints(bendPointList);
    double startX=startEnd[0].getX();
    double startY=startEnd[0].getY();
    double previousX=startX;
    double previousY=startY;
    double endX=startEnd[1].getX();
    double endY=startEnd[1].getY();
    path.moveTo((float)startX,(float)startY);
    bendPointList.add(0,new Point2D.Double(startX,startY));
    bendPointList.add(new Point2D.Double(endX,endY));
    for (int i=1; i <= bendPointList.size() - 1; i++) {
      int i1=i;
      int i0=i - 1;
      if (i0 < 0) {
        i0=0;
      }
      if (i0 > bendPointList.size() - 1) {
        i0=bendPointList.size() - 1;
      }
      double x0=previousX;
      double y0=previousY;
      double x1=bendPointList.get(i0).getX();
      double y1=bendPointList.get(i0).getY();
      double x2=bendPointList.get(i1).getX();
      double y2=bendPointList.get(i1).getY();
      x2=(x1 + x2) / 2;
      y2=(y1 + y2) / 2;
      double d0=Math.sqrt(((x1 - x0) * (x1 - x0)) + ((y1 - y0) * (y1 - y0)));
      double d1=Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));
      double r=Math.min(_bendRadius,d0);
      r=Math.min(r,d1);
      if ((d0 == 0.0) || (d1 == 0.0)) {
        path.lineTo((float)x1,(float)y1);
      }
 else {
        double intX0=x1 + ((r / d0) * (x0 - x1));
        double intY0=y1 + ((r / d0) * (y0 - y1));
        double intX1=x1 + ((r / d1) * (x2 - x1));
        double intY1=y1 + ((r / d1) * (y2 - y1));
        path.lineTo((float)intX0,(float)intY0);
        path.curveTo((float)x1,(float)y1,(float)x1,(float)y1,(float)intX1,(float)intY1);
        previousX=x2;
        previousY=y2;
      }
    }
    path.lineTo((float)endX,(float)endY);
    setShape(path);
    int count=bendPointList.size();
    Point2D point1=bendPointList.get(count / 2 - 1);
    Point2D point2=bendPointList.get(count / 2);
    _labelLocation=(new Point2D.Double((point1.getX() + point2.getX()) / 2,(point1.getY() + point2.getY()) / 2));
    repositionLabel();
    repaint();
  }
 else {
    super.route();
  }
}