Program: 6703
Project: 6703
Buggy source:
public List<CorridorComponent> getOffsetComponents(int offsetFrom,int offsetTo,MapCoordinates coords,boolean fw){
  List<CorridorComponent> comps=new LinkedList<CorridorComponent>();
  Point2D fPoint=new Point2D.Double(x1(),y1()), tPoint=new Point2D.Double(x2(),y2());
  if (offsetFrom != 0 || offsetTo != 0)   applyOffsets(fPoint,tPoint,offsetFrom,offsetTo,coords);
  double x1=fPoint.getX(), y1=fPoint.getY();
  double x2=tPoint.getX(), y2=tPoint.getY();
  if (isStraight()) {
    Point2D mid=new Point2D.Double((fPoint.getX() + tPoint.getX()) / 2,(fPoint.getY() + tPoint.getY()) / 2);
    if (fw) {
      comps.add(new SegmentComponent(fPoint,mid));
      comps.add(new SegmentComponent(mid,tPoint));
    }
 else {
      comps.add(new SegmentComponent(tPoint,mid));
      comps.add(new SegmentComponent(mid,fPoint));
    }
  }
 else   if (offsetFrom == 0 && offsetTo == 0) {
    comps.add(new SegmentComponent(fw ? fPoint : tPoint,fw ? defaultArcFW_.getStartPoint() : defaultArcBW_.getStartPoint()));
    comps.add(new ArcComponent(fw ? defaultArcFW_ : defaultArcBW_));
    comps.add(new SegmentComponent(fw ? defaultArcFW_.getEndPoint() : defaultArcBW_.getEndPoint(),fw ? tPoint : fPoint));
  }
 else {
    Point2D.Double e=constructElbow(x1,y1,x2,y2);
    double l=radiusW_ / Math.tan(thetaR_ / 2);
    double rw=radiusW_;
    double shortest=Math.min(FPUtil.magnitude(x1,y1,e.x,e.y),FPUtil.magnitude(x2,y2,e.x,e.y));
    if (shortest < l) {
      l=shortest;
      rw=l * Math.tan(thetaR_ / 2);
    }
    Arc2D arc=fw ? constructArcFW(x1,y1,x2,y2,e,l,rw) : constructArcBW(x1,y1,x2,y2,e,l,rw);
    comps.add(new SegmentComponent(fw ? fPoint : tPoint,fw ? arc.getStartPoint() : arc.getStartPoint()));
    comps.add(new ArcComponent(arc));
    comps.add(new SegmentComponent(fw ? arc.getEndPoint() : arc.getEndPoint(),fw ? tPoint : fPoint));
  }
  return comps;
}

Fixed version (ground truth):
public List<CorridorComponent> getOffsetComponents(int offsetFrom,int offsetTo,MapCoordinates coords,boolean fw){
  List<CorridorComponent> comps=new LinkedList<CorridorComponent>();
  Point2D fPoint=new Point2D.Double(x1(),y1()), tPoint=new Point2D.Double(x2(),y2());
  if (offsetFrom != 0 || offsetTo != 0)   applyOffsets(fPoint,tPoint,offsetFrom,offsetTo,coords);
  double x1=fPoint.getX(), y1=fPoint.getY();
  double x2=tPoint.getX(), y2=tPoint.getY();
  if (isStraight()) {
    Point2D mid=new Point2D.Double((fPoint.getX() + tPoint.getX()) / 2,(fPoint.getY() + tPoint.getY()) / 2);
    if (fw) {
      comps.add(new SegmentComponent(fPoint,mid));
      comps.add(new SegmentComponent(mid,tPoint));
    }
 else {
      comps.add(new SegmentComponent(tPoint,mid));
      comps.add(new SegmentComponent(mid,fPoint));
    }
  }
 else   if (offsetFrom == 0 && offsetTo == 0) {
    comps.add(new SegmentComponent(fw ? fPoint : tPoint,fw ? defaultArcFW_.getStartPoint() : defaultArcBW_.getStartPoint()));
    comps.add(new ArcComponent(fw ? defaultArcFW_ : defaultArcBW_));
    comps.add(new SegmentComponent(fw ? defaultArcFW_.getEndPoint() : defaultArcBW_.getEndPoint(),fw ? tPoint : fPoint));
  }
 else {
    Arc2D defArc=fw ? defaultArcFW_ : defaultArcBW_;
    Point2D.Double e=constructElbow(x1,y1,x2,y2);
    int ccw=Line2D.relativeCCW(x1,y1,e.x,e.y,x2,y2);
    double combinedOffset=(offsetFrom + offsetTo) / 2;
    double rw=radiusW_ - ccw * coords.dxToWorld(combinedOffset - this.avgOffset_);
    double halfTheta=thetaR_ / 2;
    double l=radiusW_ / Math.tan(halfTheta);
    double shortest=Math.min(FPUtil.magnitude(x1,y1,e.x,e.y),FPUtil.magnitude(x2,y2,e.x,e.y));
    if (shortest < l)     rw=shortest * Math.tan(halfTheta);
    double h=rw / Math.sin(halfTheta);
    double hAngle=FPUtil.getTheta(x2 - e.x,y2 - e.y) - ccw * halfTheta;
    double cx=e.x + h * Math.cos(hAngle);
    double cy=e.y + h * Math.sin(hAngle);
    Arc2D arc=new Arc2D.Double(cx - rw,cy - rw,rw * 2,rw * 2,defArc.getAngleStart(),defArc.getAngleExtent(),Arc2D.OPEN);
    comps.add(new SegmentComponent(fw ? fPoint : tPoint,fw ? arc.getStartPoint() : arc.getStartPoint()));
    comps.add(new ArcComponent(arc));
    comps.add(new SegmentComponent(fw ? arc.getEndPoint() : arc.getEndPoint(),fw ? tPoint : fPoint));
  }
  return comps;
}