Program: 30071
Project: 30071
Buggy source:
@Override public HE_Mesh apply(final HE_Selection selection){
  selection.parent.splitFacesQuad(selection);
  final List<WB_Point> newPositions=new ArrayList<WB_Point>();
  final List<HE_Vertex> boundary=selection.getBoundaryVertices();
  final List<HE_Vertex> inner=selection.getInnerVertices();
  final List<HE_Vertex> outer=selection.getOuterVertices();
  System.out.println(boundary.size() + "String_Node_Str" + inner.size()+ "String_Node_Str"+ outer.size());
  List<HE_Face> sharedFaces;
  HE_Vertex v;
  Iterator<HE_Vertex> vItr=outer.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if (boundary.contains(v)) {
      vItr.remove();
    }
  }
  HE_Vertex n;
  List<HE_Vertex> neighbors;
  int id=0;
  vItr=inner.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    final WB_Point p=new WB_Point(v);
    neighbors=v.getNeighborVertices();
    p.mulSelf(origWeight);
    double c=origWeight;
    for (int i=0; i < neighbors.size(); i++) {
      n=neighbors.get(i);
      p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
      c+=neigWeight;
    }
    newPositions.add(p.scaleSelf(1.0 / c));
    id++;
  }
  vItr=boundary.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if (keepBoundary) {
      newPositions.add(v.getPoint());
    }
 else {
      final WB_Point p=new WB_Point(v);
      neighbors=v.getNeighborVertices();
      p.mulSelf(origWeight);
      double c=origWeight;
      int nc=0;
      for (int i=0; i < neighbors.size(); i++) {
        n=neighbors.get(i);
        if (boundary.contains(n)) {
          p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
          c+=neigWeight;
          nc++;
        }
      }
      newPositions.add((nc > 1) ? p.scaleSelf(1.0 / c) : v.getPoint());
    }
    id++;
  }
  vItr=outer.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if ((keepEdges) || (v.getVertexType() != WB_Convex.FLAT)) {
      newPositions.add(v.getPoint());
    }
 else {
      final WB_Point p=new WB_Point(v);
      neighbors=v.getNeighborVertices();
      p.mulSelf(origWeight);
      double c=origWeight;
      int nc=0;
      for (int i=0; i < neighbors.size(); i++) {
        n=neighbors.get(i);
        if (outer.contains(n)) {
          sharedFaces=selection.parent.getSharedFaces(v,n);
          boolean singleFaceGap=true;
          for (int j=0; j < sharedFaces.size(); j++) {
            if (selection.contains(sharedFaces.get(j))) {
              singleFaceGap=false;
              break;
            }
          }
          if (!singleFaceGap) {
            p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
            c+=neigWeight;
            nc++;
          }
        }
      }
      newPositions.add((nc > 1) ? p.scaleSelf(1.0 / c) : v.getPoint());
    }
    id++;
  }
  vItr=inner.iterator();
  id=0;
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  vItr=boundary.iterator();
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  vItr=outer.iterator();
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  return selection.parent;
}

Fixed version (ground truth):
@Override public HE_Mesh apply(final HE_Selection selection){
  selection.parent.splitFacesQuad(selection);
  final List<WB_Point> newPositions=new ArrayList<WB_Point>();
  final List<HE_Vertex> boundary=selection.getBoundaryVertices();
  final List<HE_Vertex> inner=selection.getInnerVertices();
  final List<HE_Vertex> outer=selection.getOuterVertices();
  List<HE_Face> sharedFaces;
  HE_Vertex v;
  Iterator<HE_Vertex> vItr=outer.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if (boundary.contains(v)) {
      vItr.remove();
    }
  }
  HE_Vertex n;
  List<HE_Vertex> neighbors;
  int id=0;
  vItr=inner.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    final WB_Point p=new WB_Point(v);
    neighbors=v.getNeighborVertices();
    p.mulSelf(origWeight);
    double c=origWeight;
    for (int i=0; i < neighbors.size(); i++) {
      n=neighbors.get(i);
      p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
      c+=neigWeight;
    }
    newPositions.add(p.scaleSelf(1.0 / c));
    id++;
  }
  vItr=boundary.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if (keepBoundary) {
      newPositions.add(v.getPoint());
    }
 else {
      final WB_Point p=new WB_Point(v);
      neighbors=v.getNeighborVertices();
      p.mulSelf(origWeight);
      double c=origWeight;
      int nc=0;
      for (int i=0; i < neighbors.size(); i++) {
        n=neighbors.get(i);
        if (boundary.contains(n)) {
          p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
          c+=neigWeight;
          nc++;
        }
      }
      newPositions.add((nc > 1) ? p.scaleSelf(1.0 / c) : v.getPoint());
    }
    id++;
  }
  vItr=outer.iterator();
  while (vItr.hasNext()) {
    v=vItr.next();
    if ((keepEdges) || (v.getVertexType() != WB_Convex.FLAT)) {
      newPositions.add(v.getPoint());
    }
 else {
      final WB_Point p=new WB_Point(v);
      neighbors=v.getNeighborVertices();
      p.mulSelf(origWeight);
      double c=origWeight;
      int nc=0;
      for (int i=0; i < neighbors.size(); i++) {
        n=neighbors.get(i);
        if (outer.contains(n)) {
          sharedFaces=selection.parent.getSharedFaces(v,n);
          boolean singleFaceGap=true;
          for (int j=0; j < sharedFaces.size(); j++) {
            if (selection.contains(sharedFaces.get(j))) {
              singleFaceGap=false;
              break;
            }
          }
          if (!singleFaceGap) {
            p.addSelf(neigWeight * n.xd(),neigWeight * n.yd(),neigWeight * n.zd());
            c+=neigWeight;
            nc++;
          }
        }
      }
      newPositions.add((nc > 1) ? p.scaleSelf(1.0 / c) : v.getPoint());
    }
    id++;
  }
  vItr=inner.iterator();
  id=0;
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  vItr=boundary.iterator();
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  vItr=outer.iterator();
  while (vItr.hasNext()) {
    vItr.next().set(newPositions.get(id));
    id++;
  }
  return selection.parent;
}