Program: 29972
Project: 29972
Buggy source:
/** 
 */
private void createStruts(){
  int i=0;
  for (  final WB_FrameStrut strut : frame.getStruts()) {
    final int offsets=i * 2;
    final int offsete=(i * 2) + 1;
    int ns=(int)Math.round(strut.getLength() / maximumStrutLength);
    ns=Math.max(ns,1);
    final ArrayList<HE_Halfedge> hes=new ArrayList<HE_Halfedge>();
    final HE_Vertex[][] extraVertices=new HE_Vertex[strutFacets][ns - 1];
    for (int j=0; j < strutFacets; j++) {
      for (int k=0; k < (ns - 1); k++) {
        extraVertices[j][k]=new HE_Vertex(gf.createInterpolatedPoint(strutNodeConnections[offsets].vertices.get(j),strutNodeConnections[offsete].vertices.get(j),(k + 1) / (double)ns));
        mesh.add(extraVertices[j][k]);
      }
    }
    for (int j=0; j < strutFacets; j++) {
      final int jp=(j + 1) % strutFacets;
      final HE_Vertex s0=strutNodeConnections[offsets].vertices.get(j);
      final HE_Vertex s1=strutNodeConnections[offsets].vertices.get(jp);
      final HE_Vertex e2=strutNodeConnections[offsete].vertices.get(jp);
      final HE_Vertex e3=strutNodeConnections[offsete].vertices.get(j);
      for (int k=0; k < ns; k++) {
        final HE_Face f=new HE_Face();
        final HE_Halfedge he0=new HE_Halfedge();
        final HE_Halfedge he1=new HE_Halfedge();
        final HE_Halfedge he2=new HE_Halfedge();
        final HE_Halfedge he3=new HE_Halfedge();
        mesh.setVertex(he0,(k == 0) ? s0 : extraVertices[j][k - 1]);
        mesh.setVertex(he1,(k == 0) ? s1 : extraVertices[jp][k - 1]);
        mesh.setVertex(he2,(k == (ns - 1)) ? e2 : extraVertices[jp][k]);
        mesh.setVertex(he3,(k == (ns - 1)) ? e3 : extraVertices[j][k]);
        mesh.setNext(he0,he1);
        mesh.setNext(he1,he2);
        mesh.setNext(he2,he3);
        mesh.setNext(he3,he0);
        mesh.setFace(he0,f);
        mesh.setHalfedge(f,he0);
        f.setTemporaryLabel(1);
        mesh.setFace(he1,f);
        mesh.setFace(he2,f);
        mesh.setFace(he3,f);
        mesh.setHalfedge(he0.getVertex(),he0);
        mesh.setHalfedge(he1.getVertex(),he1);
        mesh.setHalfedge(he2.getVertex(),he2);
        mesh.setHalfedge(he3.getVertex(),he3);
        mesh.add(f);
        mesh.add(he0);
        mesh.add(he1);
        mesh.add(he2);
        mesh.add(he3);
        hes.add(he1);
        hes.add(he3);
        if ((k < (ns - 1)) && (k > 0)) {
          hes.add(he0);
          hes.add(he2);
        }
      }
    }
    i++;
  }
}

Fixed version (ground truth):
/** 
 */
private void createStruts(){
  int i=0;
  for (  final WB_FrameStrut strut : frame.getStruts()) {
    final int offsets=i * 2;
    final int offsete=(i * 2) + 1;
    int ns=(int)Math.round(strut.getLength() / maximumStrutLength);
    ns=Math.max(ns,1);
    final ArrayList<HE_Halfedge> hes=new ArrayList<HE_Halfedge>();
    final HE_Vertex[][] extraVertices=new HE_Vertex[strutFacets][ns - 1];
    for (int j=0; j < strutFacets; j++) {
      for (int k=0; k < (ns - 1); k++) {
        extraVertices[j][k]=new HE_Vertex(gf.createInterpolatedPoint(strutNodeConnections[offsets].vertices.get(j),strutNodeConnections[offsete].vertices.get(j),(k + 1) / (double)ns));
        mesh.add(extraVertices[j][k]);
      }
    }
    for (int j=0; j < strutFacets; j++) {
      final int jp=(j + 1) % strutFacets;
      final HE_Vertex s0=strutNodeConnections[offsets].vertices.get(j);
      final HE_Vertex s1=strutNodeConnections[offsets].vertices.get(jp);
      final HE_Vertex e2=strutNodeConnections[offsete].vertices.get(jp);
      final HE_Vertex e3=strutNodeConnections[offsete].vertices.get(j);
      for (int k=0; k < ns; k++) {
        final HE_Face f=new HE_Face();
        final HE_Halfedge he0=new HE_Halfedge();
        final HE_Halfedge he1=new HE_Halfedge();
        final HE_Halfedge he2=new HE_Halfedge();
        final HE_Halfedge he3=new HE_Halfedge();
        mesh.setVertex(he0,(k == 0) ? s0 : extraVertices[j][k - 1]);
        mesh.setVertex(he1,(k == 0) ? s1 : extraVertices[jp][k - 1]);
        mesh.setVertex(he2,(k == (ns - 1)) ? e2 : extraVertices[jp][k]);
        mesh.setVertex(he3,(k == (ns - 1)) ? e3 : extraVertices[j][k]);
        mesh.setNext(he0,he1);
        mesh.setNext(he1,he2);
        mesh.setNext(he2,he3);
        mesh.setNext(he3,he0);
        mesh.setFace(he0,f);
        mesh.setHalfedge(f,he0);
        f.setInternalLabel(1);
        mesh.setFace(he1,f);
        mesh.setFace(he2,f);
        mesh.setFace(he3,f);
        mesh.setHalfedge(he0.getVertex(),he0);
        mesh.setHalfedge(he1.getVertex(),he1);
        mesh.setHalfedge(he2.getVertex(),he2);
        mesh.setHalfedge(he3.getVertex(),he3);
        mesh.add(f);
        mesh.add(he0);
        mesh.add(he1);
        mesh.add(he2);
        mesh.add(he3);
        hes.add(he1);
        hes.add(he3);
        if ((k < (ns - 1)) && (k > 0)) {
          hes.add(he0);
          hes.add(he2);
        }
      }
    }
    i++;
  }
}