Program: 70998
Project: 70998
Buggy source:
public void render(GLRenderer renderer,RenderProps props,int flags){
  GL2 gl=renderer.getGL2();
  offsetMag=1.0 * renderer.centerDistancePerPixel();
  renderer.getZDirection();
  Vector3d offDir=new Vector3d(renderer.getZDirection());
  double scale=offsetMag / offDir.norm();
  offDir.scale(scale);
  if (myRenderSegments != null) {
    for (    LineSeg seg : myRenderSegments) {
      renderer.drawLine(props,seg.coords0,seg.coords1,false);
    }
  }
  if (drawIntersectionContour && props.getEdgeWidth() > 0 && myRenderContactInfo != null) {
    gl.glLineWidth(props.getEdgeWidth());
    float[] rgb=props.getEdgeColorArray();
    if (rgb == null) {
      rgb=props.getLineColorArray();
    }
    renderer.setColor(rgb,false);
    renderer.setLightingEnabled(false);
    if (myRenderContactInfo.contours != null) {
      for (      MeshIntersectionContour contour : myRenderContactInfo.contours) {
        gl.glBegin(GL2.GL_LINE_LOOP);
        for (        MeshIntersectionPoint p : contour) {
          gl.glVertex3d(p.x + offDir.x,p.y + offDir.y,p.z + offDir.z);
        }
        gl.glEnd();
      }
    }
 else     if (myRenderContactInfo.intersections != null) {
      gl.glBegin(GL2.GL_LINES);
      for (      TriTriIntersection tsect : myRenderContactInfo.intersections) {
        gl.glVertex3d(tsect.points[0].x + offDir.x,tsect.points[0].y + offDir.y,tsect.points[0].z + offDir.z);
        gl.glVertex3d(tsect.points[1].x + offDir.x,tsect.points[1].y + offDir.y,tsect.points[1].z + offDir.z);
      }
      gl.glEnd();
    }
    renderer.setLightingEnabled(true);
    gl.glLineWidth(1);
  }
  float[] coords=new float[3];
  if (drawIntersectionPoints && myRenderContactInfo != null) {
    if (myRenderContactInfo.intersections != null) {
      for (      TriTriIntersection tsect : myRenderContactInfo.intersections) {
        for (        Point3d pnt : tsect.points) {
          pnt.get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.points0 != null) {
      for (      ContactPenetratingPoint cpp : myRenderContactInfo.points0) {
        if (cpp.distance > 0) {
          cpp.vertex.getWorldPoint().get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.points1 != null) {
      for (      ContactPenetratingPoint cpp : myRenderContactInfo.points1) {
        if (cpp.distance > 0) {
          cpp.vertex.getWorldPoint().get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.edgeEdgeContacts != null) {
      for (      EdgeEdgeContact eec : myRenderContactInfo.edgeEdgeContacts) {
        eec.point0.get(coords);
        renderer.drawPoint(props,coords,false);
        eec.point1.get(coords);
        renderer.drawPoint(props,coords,false);
      }
    }
  }
  if (drawIntersectionFaces && myRenderFaces != null) {
    gl.glPushMatrix();
    Material faceMat=props.getFaceMaterial();
    Shading shading=props.getShading();
    if (shading != Shading.NONE) {
      faceMat.apply(gl,GL2.GL_FRONT_AND_BACK);
      gl.glLightModelf(GL2.GL_LIGHT_MODEL_TWO_SIDE,1);
    }
    if (props.getFaceStyle() != RenderProps.Faces.NONE) {
      int[] savedShadeModel=new int[1];
      gl.glGetIntegerv(GL2.GL_SHADE_MODEL,savedShadeModel,0);
      if (shading == Shading.NONE) {
        renderer.setLightingEnabled(false);
        renderer.setColor(props.getFaceColorArray(),false);
      }
 else       if (shading != Shading.FLAT && !renderer.isSelecting()) {
        gl.glShadeModel(GL2.GL_SMOOTH);
      }
 else {
        gl.glShadeModel(GL2.GL_FLAT);
      }
      byte[] savedCullFaceEnabled=new byte[1];
      int[] savedCullFaceMode=new int[1];
      gl.glGetBooleanv(GL2.GL_CULL_FACE,savedCullFaceEnabled,0);
      gl.glGetIntegerv(GL2.GL_CULL_FACE_MODE,savedCullFaceMode,0);
      RenderProps.Faces faces=props.getFaceStyle();
switch (faces) {
case FRONT_AND_BACK:
{
          gl.glDisable(GL2.GL_CULL_FACE);
          break;
        }
case FRONT:
{
        gl.glCullFace(GL2.GL_BACK);
        break;
      }
case BACK:
{
      gl.glCullFace(GL2.GL_FRONT);
      break;
    }
default :
  break;
}
offDir.scale(0.5);
gl.glBegin(GL2.GL_TRIANGLES);
for (FaceSeg seg : myRenderFaces) {
gl.glNormal3d(seg.nrm.x,seg.nrm.y,seg.nrm.z);
gl.glVertex3d(seg.p0.x + offDir.x,seg.p0.y + offDir.y,seg.p0.z + offDir.z);
gl.glVertex3d(seg.p1.x + offDir.x,seg.p1.y + offDir.y,seg.p1.z + offDir.z);
gl.glVertex3d(seg.p2.x + offDir.x,seg.p2.y + offDir.y,seg.p2.z + offDir.z);
}
gl.glEnd();
if (savedCullFaceEnabled[0] != 0) {
gl.glEnable(GL2.GL_CULL_FACE);
}
 else {
gl.glDisable(GL2.GL_CULL_FACE);
}
gl.glCullFace(savedCullFaceMode[0]);
if (shading == Shading.NONE) {
renderer.setLightingEnabled(true);
}
gl.glShadeModel(savedShadeModel[0]);
}
gl.glPopMatrix();
}
}

Fixed version (ground truth):
public void render(GLRenderer renderer,RenderProps props,int flags){
  GL2 gl=renderer.getGL2();
  double offsetMag=1.0 * renderer.centerDistancePerPixel();
  renderer.getZDirection();
  Vector3d offDir=new Vector3d(renderer.getZDirection());
  double scale=offsetMag / offDir.norm();
  offDir.scale(scale);
  if (myRenderSegments != null) {
    for (    LineSeg seg : myRenderSegments) {
      renderer.drawLine(props,seg.coords0,seg.coords1,false);
    }
  }
  if (drawIntersectionContour && props.getEdgeWidth() > 0 && myRenderContactInfo != null) {
    gl.glLineWidth(props.getEdgeWidth());
    float[] rgb=props.getEdgeColorArray();
    if (rgb == null) {
      rgb=props.getLineColorArray();
    }
    renderer.setColor(rgb,false);
    renderer.setLightingEnabled(false);
    if (myRenderContactInfo.contours != null) {
      for (      MeshIntersectionContour contour : myRenderContactInfo.contours) {
        gl.glBegin(GL2.GL_LINE_LOOP);
        for (        MeshIntersectionPoint p : contour) {
          gl.glVertex3d(p.x + offDir.x,p.y + offDir.y,p.z + offDir.z);
        }
        gl.glEnd();
      }
    }
 else     if (myRenderContactInfo.intersections != null) {
      gl.glBegin(GL2.GL_LINES);
      for (      TriTriIntersection tsect : myRenderContactInfo.intersections) {
        gl.glVertex3d(tsect.points[0].x + offDir.x,tsect.points[0].y + offDir.y,tsect.points[0].z + offDir.z);
        gl.glVertex3d(tsect.points[1].x + offDir.x,tsect.points[1].y + offDir.y,tsect.points[1].z + offDir.z);
      }
      gl.glEnd();
    }
    renderer.setLightingEnabled(true);
    gl.glLineWidth(1);
  }
  float[] coords=new float[3];
  if (drawIntersectionPoints && myRenderContactInfo != null) {
    if (myRenderContactInfo.intersections != null) {
      for (      TriTriIntersection tsect : myRenderContactInfo.intersections) {
        for (        Point3d pnt : tsect.points) {
          pnt.get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.points0 != null) {
      for (      ContactPenetratingPoint cpp : myRenderContactInfo.points0) {
        if (cpp.distance > 0) {
          cpp.vertex.getWorldPoint().get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.points1 != null) {
      for (      ContactPenetratingPoint cpp : myRenderContactInfo.points1) {
        if (cpp.distance > 0) {
          cpp.vertex.getWorldPoint().get(coords);
          renderer.drawPoint(props,coords,false);
        }
      }
    }
    if (myRenderContactInfo.edgeEdgeContacts != null) {
      for (      EdgeEdgeContact eec : myRenderContactInfo.edgeEdgeContacts) {
        eec.point0.get(coords);
        renderer.drawPoint(props,coords,false);
        eec.point1.get(coords);
        renderer.drawPoint(props,coords,false);
      }
    }
  }
  if (drawIntersectionFaces && myRenderFaces != null) {
    gl.glPushMatrix();
    Material faceMat=props.getFaceMaterial();
    Shading shading=props.getShading();
    if (shading != Shading.NONE) {
      faceMat.apply(gl,GL2.GL_FRONT_AND_BACK);
      gl.glLightModelf(GL2.GL_LIGHT_MODEL_TWO_SIDE,1);
    }
    if (props.getFaceStyle() != RenderProps.Faces.NONE) {
      int[] savedShadeModel=new int[1];
      gl.glGetIntegerv(GL2.GL_SHADE_MODEL,savedShadeModel,0);
      if (shading == Shading.NONE) {
        renderer.setLightingEnabled(false);
        renderer.setColor(props.getFaceColorArray(),false);
      }
 else       if (shading != Shading.FLAT && !renderer.isSelecting()) {
        gl.glShadeModel(GL2.GL_SMOOTH);
      }
 else {
        gl.glShadeModel(GL2.GL_FLAT);
      }
      byte[] savedCullFaceEnabled=new byte[1];
      int[] savedCullFaceMode=new int[1];
      gl.glGetBooleanv(GL2.GL_CULL_FACE,savedCullFaceEnabled,0);
      gl.glGetIntegerv(GL2.GL_CULL_FACE_MODE,savedCullFaceMode,0);
      RenderProps.Faces faces=props.getFaceStyle();
switch (faces) {
case FRONT_AND_BACK:
{
          gl.glDisable(GL2.GL_CULL_FACE);
          break;
        }
case FRONT:
{
        gl.glCullFace(GL2.GL_BACK);
        break;
      }
case BACK:
{
      gl.glCullFace(GL2.GL_FRONT);
      break;
    }
default :
  break;
}
offDir.scale(0.5);
gl.glBegin(GL2.GL_TRIANGLES);
for (FaceSeg seg : myRenderFaces) {
gl.glNormal3d(seg.nrm.x,seg.nrm.y,seg.nrm.z);
gl.glVertex3d(seg.p0.x + offDir.x,seg.p0.y + offDir.y,seg.p0.z + offDir.z);
gl.glVertex3d(seg.p1.x + offDir.x,seg.p1.y + offDir.y,seg.p1.z + offDir.z);
gl.glVertex3d(seg.p2.x + offDir.x,seg.p2.y + offDir.y,seg.p2.z + offDir.z);
}
gl.glEnd();
if (savedCullFaceEnabled[0] != 0) {
gl.glEnable(GL2.GL_CULL_FACE);
}
 else {
gl.glDisable(GL2.GL_CULL_FACE);
}
gl.glCullFace(savedCullFaceMode[0]);
if (shading == Shading.NONE) {
renderer.setLightingEnabled(true);
}
gl.glShadeModel(savedShadeModel[0]);
}
gl.glPopMatrix();
}
}