Program: 152041
Project: 152041
Buggy source:
/** 
 * Calculates the minimum distance to the origin for the A polygon edges in the convex hull of the Minkowski difference of the A and B polygons.
 */
protected static Vector2f getMinMinkowskyDifference(Vector2f[] A,Vector2f[] B,float radius,Vector2f minDistance){
  if (Vector2f.ZERO.equals(minDistance)) {
    return minDistance;
  }
  boolean flip=minDistance != null;
  for (int ii=0, nn=A.length; ii < nn; ii++) {
    Vector2f start=A[ii];
    Vector2f end=A[(ii + 1) % nn];
    Vector2f sprime=Vector2f.ZERO;
    Vector2f eprime=Vector2f.ZERO;
    Vector2f perp=new Vector2f(start.y - end.y,end.x - start.x);
    float dot=Float.NEGATIVE_INFINITY;
    int dj=0;
    for (int jj=0, mm=B.length; jj < mm; jj++) {
      float odot=perp.dot(B[jj]);
      if (odot > dot) {
        dot=odot;
        sprime=B[jj];
        eprime=sprime;
        dj=jj;
      }
 else       if (FloatMath.epsilonEquals(odot,dot)) {
        if (dj == (jj + 1) % mm) {
          sprime=B[jj];
        }
 else {
          eprime=B[jj];
        }
      }
    }
    if (flip) {
      sprime=sprime.subtract(start);
      eprime=eprime.subtract(end);
    }
 else {
      sprime=start.subtract(sprime);
      eprime=end.subtract(eprime);
    }
    Vector2f distance=new Vector2f();
    getOutsideLinePenetration(sprime,eprime,radius,Vector2f.ZERO,distance);
    if (minDistance == null || minDistance.distanceSquared(Vector2f.ZERO) > distance.distanceSquared(Vector2f.ZERO)) {
      minDistance=distance;
      if (minDistance.equals(Vector2f.ZERO)) {
        break;
      }
    }
  }
  return minDistance;
}

Fixed version (ground truth):
/** 
 * Calculates the minimum distance to the origin for the A polygon edges in the convex hull of the Minkowski difference of the A and B polygons.
 */
protected static Vector2f getMinMinkowskyDifference(Vector2f[] A,Vector2f[] B,float radius,Vector2f minDistance){
  if (Vector2f.ZERO.equals(minDistance)) {
    return minDistance;
  }
  boolean flip=minDistance != null;
  for (int ii=0, nn=A.length; ii < nn; ii++) {
    Vector2f start=A[ii];
    Vector2f end=A[(ii + 1) % nn];
    Vector2f sprime=Vector2f.ZERO;
    Vector2f eprime=Vector2f.ZERO;
    Vector2f perp=new Vector2f(start.y - end.y,end.x - start.x);
    float dot=Float.NEGATIVE_INFINITY;
    int dj=0;
    for (int jj=0, mm=B.length; jj < mm; jj++) {
      float odot=perp.dot(B[jj]);
      if (odot > dot) {
        dot=odot;
        sprime=B[jj];
        eprime=sprime;
        dj=jj;
      }
 else       if (FloatMath.epsilonEquals(odot,dot)) {
        Vector2f perp2=new Vector2f(B[jj].y - sprime.y,sprime.x - B[jj].x);
        if (perp.dot(perp2) < 0) {
          sprime=B[jj];
        }
 else {
          eprime=B[jj];
        }
      }
    }
    if (flip) {
      sprime=sprime.subtract(start);
      eprime=eprime.subtract(end);
    }
 else {
      sprime=start.subtract(sprime);
      eprime=end.subtract(eprime);
    }
    Vector2f distance=new Vector2f();
    getOutsideLinePenetration(sprime,eprime,radius,Vector2f.ZERO,distance);
    if (minDistance == null || minDistance.distanceSquared(Vector2f.ZERO) > distance.distanceSquared(Vector2f.ZERO)) {
      minDistance=distance;
      if (minDistance.equals(Vector2f.ZERO)) {
        break;
      }
    }
  }
  return minDistance;
}