Program: 43057
Project: 43057
Buggy source:
/** 
 * Collapse an edge.
 * @param e
 * @param pos The position of the new common vertex
 */
public void collapseEdge(Edge e,Point3d pos){
  if (DEBUG)   System.out.println("String_Node_Str" + e + "String_Node_Str"+ pos);
  Vertex commonv=e.getHe().getHead();
  tvertices.remove(commonv.getPoint());
  commonv.getPoint().x=pos.x;
  commonv.getPoint().y=pos.y;
  commonv.getPoint().z=pos.z;
  tvertices.put(commonv.getPoint(),commonv);
  if (DEBUG)   System.out.println("String_Node_Str" + commonv.getID() + "String_Node_Str"+ pos);
  Face face1=e.getHe().getLeft();
  Face face2=e.getHe().getTwin().getLeft();
  Vertex removev=e.getHe().getTail();
  if (DEBUG)   System.out.println("String_Node_Str" + removev.getID() + "String_Node_Str"+ commonv.getID());
  ArrayList<Edge> redges=new ArrayList<Edge>();
  changeVertex(face1,removev,commonv,redges);
  changeVertex(face2,removev,commonv,redges);
  if (DEBUG)   System.out.println("String_Node_Str" + removev.getID());
  removeVertex(removev);
  removeHalfEdges(face1);
  removeHalfEdges(face2);
  removeFace(face1);
  removeFace(face2);
  removeEdge(e);
  HalfEdge he1;
  HalfEdgeKey key=new HalfEdgeKey();
  System.out.println("String_Node_Str");
  redges.clear();
  for (Edge e1=edges; e1 != null; e1=e1.getNext()) {
    redges.add(e1);
  }
  for (  Edge e1 : redges) {
    he1=e1.getHe();
    if (he1 == null) {
      continue;
    }
    HalfEdge twin=he1.getTwin();
    if (twin == null) {
      key.o1=he1.getHead();
      key.o2=he1.getTail();
      HalfEdge e2=edgeMap.get(key);
      if (e2 != null) {
        betwin(he1,e2);
      }
 else {
        writeOBJ(System.out);
        throw new IllegalArgumentException("String_Node_Str" + he1);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Collapse an edge.
 * @param e
 * @param pos The position of the new common vertex
 */
public void collapseEdge(Edge e,Point3d pos){
  if (DEBUG)   System.out.println("String_Node_Str" + e + "String_Node_Str"+ pos);
  Vertex commonv=e.getHe().getHead();
  tvertices.remove(commonv.getPoint());
  commonv.getPoint().x=pos.x;
  commonv.getPoint().y=pos.y;
  commonv.getPoint().z=pos.z;
  tvertices.put(commonv.getPoint(),commonv);
  if (DEBUG)   System.out.println("String_Node_Str" + commonv.getID() + "String_Node_Str"+ pos);
  Face face1=e.getHe().getLeft();
  Face face2=e.getHe().getTwin().getLeft();
  Vertex removev=e.getHe().getTail();
  if (DEBUG)   System.out.println("String_Node_Str" + removev.getID() + "String_Node_Str"+ commonv.getID());
  ArrayList<Edge> redges=new ArrayList<Edge>();
  changeVertex(face1,removev,commonv,redges);
  changeVertex(face2,removev,commonv,redges);
  if (DEBUG)   System.out.println("String_Node_Str" + removev.getID());
  removeVertex(removev);
  removeHalfEdges(face1);
  removeHalfEdges(face2);
  removeFace(face1);
  removeFace(face2);
  removeEdge(e);
  HalfEdge he1;
  HalfEdgeKey key=new HalfEdgeKey();
  System.out.println("String_Node_Str");
  redges.clear();
  for (Edge e1=edges; e1 != null; e1=e1.getNext()) {
    redges.add(e1);
  }
  for (  Edge e1 : redges) {
    he1=e1.getHe();
    if (he1 == null) {
      continue;
    }
    HalfEdge twin=he1.getTwin();
    if (twin == null) {
      key.setHead(he1.getHead());
      key.setTail(he1.getTail());
      HalfEdge e2=edgeMap.get(key);
      if (e2 != null) {
        betwin(he1,e2);
      }
 else {
        writeOBJ(System.out);
        System.out.println("String_Node_Str");
        for (        Map.Entry<HalfEdgeKey,HalfEdge> entry : edgeMap.entrySet()) {
          System.out.println(entry.getKey() + "String_Node_Str" + entry.getValue());
        }
        throw new IllegalArgumentException("String_Node_Str" + he1 + "String_Node_Str"+ he1.getHead().getID()+ "String_Node_Str"+ he1.getTail().getID());
      }
    }
  }
}