Program: 71019
Project: 71019
Buggy source:
public void render(GLRenderer renderer,RenderProps props,int flags){
  GL2 gl=renderer.getGL2().getGL2();
  gl.glPushMatrix();
  if (isRenderBuffered()) {
    renderer.mulTransform(myXMeshToWorldRender);
  }
 else {
    renderer.mulTransform(XMeshToWorld);
  }
  boolean reenableLighting=false;
  int[] savedPointSize=new int[1];
  gl.glGetIntegerv(GL2.GL_POINT_SIZE,savedPointSize,0);
  int[] savedLineWidth=new int[1];
  gl.glGetIntegerv(GL2.GL_LINE_WIDTH,savedLineWidth,0);
  int[] savedShadeModel=new int[1];
  gl.glGetIntegerv(GL2.GL_SHADE_MODEL,savedShadeModel,0);
  gl.glPointSize(props.getPointSize());
  Shading shading=props.getShading();
  if (props.getPointColor() != null && !renderer.isSelecting()) {
    if (shading != Shading.NONE) {
      renderer.setMaterial(props.getPointMaterial(),(flags & GLRenderer.SELECTED) != 0);
    }
 else {
      reenableLighting=renderer.isLightingEnabled();
      renderer.setLightingEnabled(false);
      float[] color;
      if ((flags & GLRenderer.SELECTED) != 0) {
        color=new float[3];
        renderer.getSelectionColor().getRGBColorComponents(color);
      }
 else {
        color=props.getPointColorArray();
      }
      float alpha=(float)props.getAlpha();
      renderer.setColor(color[0],color[1],color[2],alpha);
    }
  }
  boolean useDisplayList=false;
  int displayList=0;
  boolean useVertexColors=(flags & GLRenderer.VERTEX_COLORING) != 0;
  if (useDisplayListsIfPossible && isUsingDisplayList() && !(renderer.isSelecting() && useVertexColors)) {
    useDisplayList=true;
    displayList=props.getMeshDisplayList();
  }
  if (!useDisplayList || displayList < 1) {
    if (useDisplayList) {
      displayList=props.allocMeshDisplayList(gl);
      if (displayList > 0) {
        gl.glNewList(displayList,GL2.GL_COMPILE);
      }
    }
    boolean useRenderVtxs=isRenderBuffered() && !isFixed();
    gl.glBegin(GL2.GL_POINTS);
    int numn=getNumNormals();
    for (int i=0; i < myVertices.size(); i++) {
      Vertex3d vtx=myVertices.get(i);
      Point3d pnt=useRenderVtxs ? vtx.myRenderPnt : vtx.pnt;
      if (i < numn) {
        Vector3d nrm=myNormals.get(i);
        gl.glNormal3d(nrm.x,nrm.y,nrm.z);
      }
      gl.glVertex3d(pnt.x,pnt.y,pnt.z);
    }
    gl.glEnd();
    if (myNormals != null && myNormalRenderLen > 0) {
      if (props.getLineColor() != null && !renderer.isSelecting()) {
        if (shading != Shading.NONE) {
          renderer.setMaterial(props.getLineMaterial(),(flags & GLRenderer.SELECTED) != 0);
        }
 else {
          float[] color=props.getLineColorArray();
          float alpha=(float)props.getAlpha();
          renderer.setColor(color[0],color[1],color[2],alpha);
        }
      }
      gl.glLineWidth(1);
      gl.glBegin(GL2.GL_LINES);
      for (int i=0; i < myVertices.size(); i++) {
        Vertex3d vtx=myVertices.get(i);
        Point3d pnt=useRenderVtxs ? vtx.myRenderPnt : vtx.pnt;
        Vector3d nrm=myNormals.get(i);
        double s=myNormalRenderLen;
        gl.glVertex3d(pnt.x,pnt.y,pnt.z);
        gl.glVertex3d(pnt.x + s * nrm.x,pnt.y + s * nrm.y,pnt.z + s * nrm.z);
      }
      gl.glEnd();
    }
    if (useDisplayList && displayList > 0) {
      gl.glEndList();
      gl.glCallList(displayList);
    }
  }
 else {
    gl.glCallList(displayList);
  }
  if (reenableLighting) {
    renderer.setLightingEnabled(true);
  }
  gl.glPointSize(savedPointSize[0]);
  gl.glLineWidth(savedLineWidth[0]);
  gl.glShadeModel(savedShadeModel[0]);
  gl.glPopMatrix();
}

Fixed version (ground truth):
public void render(GLRenderer renderer,RenderProps props,int flags){
  GL2 gl=renderer.getGL2().getGL2();
  gl.glPushMatrix();
  if (isRenderBuffered()) {
    renderer.mulTransform(myXMeshToWorldRender);
  }
 else {
    renderer.mulTransform(XMeshToWorld);
  }
  boolean reenableLighting=false;
  int[] savedPointSize=new int[1];
  gl.glGetIntegerv(GL2.GL_POINT_SIZE,savedPointSize,0);
  int[] savedLineWidth=new int[1];
  gl.glGetIntegerv(GL2.GL_LINE_WIDTH,savedLineWidth,0);
  int[] savedShadeModel=new int[1];
  gl.glGetIntegerv(GL2.GL_SHADE_MODEL,savedShadeModel,0);
  gl.glPointSize(props.getPointSize());
  Shading shading=props.getShading();
  boolean selected=((flags & GLRenderer.SELECTED) != 0);
  if (props.getPointColor() != null && !renderer.isSelecting()) {
    if (shading != Shading.NONE) {
      renderer.setMaterial(props.getPointMaterial(),selected);
    }
 else {
      reenableLighting=renderer.isLightingEnabled();
      renderer.setLightingEnabled(false);
      float[] color;
      if ((flags & GLRenderer.SELECTED) != 0) {
        color=new float[3];
        renderer.getSelectionColor().getRGBColorComponents(color);
      }
 else {
        color=props.getPointColorArray();
      }
      float alpha=(float)props.getAlpha();
      renderer.setColor(color[0],color[1],color[2],alpha);
    }
  }
  boolean useDisplayList=false;
  int displayList=0;
  boolean useVertexColors=(flags & GLRenderer.VERTEX_COLORING) != 0;
  if (useDisplayListsIfPossible && isUsingDisplayList() && !(renderer.isSelecting() && useVertexColors)) {
    useDisplayList=true;
    displayList=props.getMeshDisplayList();
  }
  if (!useDisplayList || displayList < 1) {
    if (useDisplayList) {
      renderer.validateInternalDisplayLists(props);
      displayList=props.allocMeshDisplayList(gl);
      if (displayList > 0) {
        gl.glNewList(displayList,GL2.GL_COMPILE);
      }
    }
    boolean useRenderVtxs=isRenderBuffered() && !isFixed();
    float[] coords=new float[3];
switch (props.getPointStyle()) {
case SPHERE:
{
        float[] pointColor=new float[4];
        for (int i=0; i < myVertices.size(); i++) {
          Vertex3d vtx=myVertices.get(i);
          Point3d pnt=useRenderVtxs ? vtx.myRenderPnt : vtx.pnt;
          pnt.get(coords);
          if (useVertexColors) {
            Color c=getVertexColor(i);
            c.getColorComponents(pointColor);
            renderer.updateMaterial(props,props.getPointMaterial(),pointColor,selected);
          }
          renderer.checkAndPrintGLError();
          renderer.drawSphere(props,coords);
          renderer.checkAndPrintGLError();
        }
        break;
      }
case POINT:
    gl.glBegin(GL2.GL_POINTS);
  int numn=getNumNormals();
Vector3d zDir=renderer.getZDirection();
for (int i=0; i < myVertices.size(); i++) {
Vertex3d vtx=myVertices.get(i);
Point3d pnt=useRenderVtxs ? vtx.myRenderPnt : vtx.pnt;
if (shading != Shading.NONE) {
  if (i < numn) {
    Vector3d nrm=myNormals.get(i);
    gl.glNormal3d(nrm.x,nrm.y,nrm.z);
  }
 else {
    gl.glNormal3d(zDir.x,zDir.y,zDir.z);
  }
}
gl.glVertex3d(pnt.x,pnt.y,pnt.z);
}
gl.glEnd();
}
if (myNormals != null && myNormalRenderLen > 0) {
if (props.getLineColor() != null && !renderer.isSelecting()) {
if (shading != Shading.NONE) {
renderer.setMaterial(props.getLineMaterial(),(flags & GLRenderer.SELECTED) != 0);
}
 else {
float[] color=props.getLineColorArray();
float alpha=(float)props.getAlpha();
renderer.setColor(color[0],color[1],color[2],alpha);
}
}
gl.glLineWidth(1);
gl.glBegin(GL2.GL_LINES);
for (int i=0; i < myVertices.size(); i++) {
Vertex3d vtx=myVertices.get(i);
Point3d pnt=useRenderVtxs ? vtx.myRenderPnt : vtx.pnt;
Vector3d nrm=myNormals.get(i);
double s=myNormalRenderLen;
gl.glVertex3d(pnt.x,pnt.y,pnt.z);
gl.glVertex3d(pnt.x + s * nrm.x,pnt.y + s * nrm.y,pnt.z + s * nrm.z);
}
gl.glEnd();
}
if (useDisplayList && displayList > 0) {
gl.glEndList();
renderer.checkAndPrintGLError();
gl.glCallList(displayList);
renderer.checkAndPrintGLError();
}
}
 else {
gl.glCallList(displayList);
}
if (reenableLighting) {
renderer.setLightingEnabled(true);
}
gl.glPointSize(savedPointSize[0]);
gl.glLineWidth(savedLineWidth[0]);
gl.glShadeModel(savedShadeModel[0]);
gl.glPopMatrix();
renderer.checkAndPrintGLError();
}