Program: 70996
Project: 70996
Buggy source:
public void drawPoints(RenderProps props,Iterator<? extends RenderablePoint> iterator){
switch (props.getPointStyle()) {
case POINT:
{
      setLightingEnabled(false);
      gl.glPointSize(props.getPointSize());
      if (isSelecting()) {
        int i=0;
        while (iterator.hasNext()) {
          RenderablePoint pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            if (isSelectable(pnt)) {
              beginSelectionQuery(i);
              gl.glBegin(GL2.GL_POINTS);
              gl.glVertex3fv(pnt.getRenderCoords(),0);
              gl.glEnd();
              endSelectionQuery();
            }
          }
          i++;
        }
      }
 else {
        gl.glBegin(GL2.GL_POINTS);
        setColor(props.getPointColorArray(),false);
        while (iterator.hasNext()) {
          RenderablePoint pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            updateColor(props.getPointColorArray(),pnt.isSelected());
            gl.glVertex3fv(pnt.getRenderCoords(),0);
          }
        }
        gl.glEnd();
      }
      gl.glPointSize(1);
      setLightingEnabled(true);
      break;
    }
case SPHERE:
{
    setMaterialAndShading(props,props.getPointMaterial(),false);
    int i=0;
    while (iterator.hasNext()) {
      RenderablePoint pnt=iterator.next();
      if (pnt.getRenderProps() == null) {
        if (isSelecting()) {
          if (isSelectable(pnt)) {
            beginSelectionQuery(i);
            drawSphere(props,pnt.getRenderCoords());
            endSelectionQuery();
          }
        }
 else {
          updateMaterial(props,props.getPointMaterial(),pnt.isSelected());
          drawSphere(props,pnt.getRenderCoords());
        }
      }
      i++;
    }
    restoreShading(props);
  }
}
}

Fixed version (ground truth):
public void drawPoints(RenderProps props,Iterator<? extends RenderablePoint> iterator){
switch (props.getPointStyle()) {
case POINT:
{
      int size=props.getPointSize();
      if (size > 0) {
        setLightingEnabled(false);
        gl.glPointSize(size);
        if (isSelecting()) {
          int i=0;
          while (iterator.hasNext()) {
            RenderablePoint pnt=iterator.next();
            if (pnt.getRenderProps() == null) {
              if (isSelectable(pnt)) {
                beginSelectionQuery(i);
                gl.glBegin(GL2.GL_POINTS);
                gl.glVertex3fv(pnt.getRenderCoords(),0);
                gl.glEnd();
                endSelectionQuery();
              }
            }
            i++;
          }
        }
 else {
          gl.glBegin(GL2.GL_POINTS);
          setColor(props.getPointColorArray(),false);
          while (iterator.hasNext()) {
            RenderablePoint pnt=iterator.next();
            if (pnt.getRenderProps() == null) {
              updateColor(props.getPointColorArray(),pnt.isSelected());
              gl.glVertex3fv(pnt.getRenderCoords(),0);
            }
          }
          gl.glEnd();
        }
        gl.glPointSize(1);
        setLightingEnabled(true);
      }
      break;
    }
case SPHERE:
{
    setMaterialAndShading(props,props.getPointMaterial(),false);
    int i=0;
    while (iterator.hasNext()) {
      RenderablePoint pnt=iterator.next();
      if (pnt.getRenderProps() == null) {
        if (isSelecting()) {
          if (isSelectable(pnt)) {
            beginSelectionQuery(i);
            drawSphere(props,pnt.getRenderCoords());
            endSelectionQuery();
          }
        }
 else {
          updateMaterial(props,props.getPointMaterial(),pnt.isSelected());
          drawSphere(props,pnt.getRenderCoords());
        }
      }
      i++;
    }
    restoreShading(props);
  }
}
}