Program: 70790
Project: 70790
Buggy source:
public void drawPoints(Renderer renderer,RenderProps props,Iterator<? extends VertexComponent> iterator){
  if (!(renderer instanceof GL2Viewer)) {
    return;
  }
  GL2Viewer viewer=(GL2Viewer)renderer;
  GL2 gl=viewer.getGL2();
  gl.glPushMatrix();
  Shading savedShading=renderer.setPointShading(props);
  renderer.setPointColoring(props,false);
switch (props.getPointStyle()) {
case POINT:
{
      renderer.setPointSize(props.getPointSize());
      if (renderer.isSelecting()) {
        int i=0;
        while (iterator.hasNext()) {
          VertexComponent pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            if (renderer.isSelectable(pnt)) {
              renderer.beginSelectionQuery(i);
              gl.glBegin(GL2.GL_POINTS);
              gl.glVertex3fv(pnt.getRenderCoords(),0);
              gl.glEnd();
              renderer.endSelectionQuery();
            }
          }
          i++;
        }
      }
 else {
        gl.glBegin(GL2.GL_POINTS);
        while (iterator.hasNext()) {
          VertexComponent pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            renderer.setPointColoring(props,pnt.isSelected());
            gl.glVertex3fv(pnt.getRenderCoords(),0);
          }
        }
        gl.glEnd();
      }
      renderer.setPointSize(1);
      break;
    }
case SPHERE:
{
    int i=0;
    while (iterator.hasNext()) {
      VertexComponent pnt=iterator.next();
      double rad=props.getPointRadius();
      if (pnt.getRenderProps() == null) {
        if (renderer.isSelecting()) {
          if (renderer.isSelectable(pnt)) {
            renderer.beginSelectionQuery(i);
            renderer.drawSphere(pnt.getRenderCoords(),rad);
            renderer.endSelectionQuery();
          }
        }
 else {
          renderer.setPointColoring(props,pnt.isSelected());
          renderer.drawSphere(pnt.getRenderCoords(),rad);
        }
      }
      i++;
    }
  }
}
renderer.setShading(savedShading);
gl.glPopMatrix();
}

Fixed version (ground truth):
public void drawPoints(Renderer renderer,RenderProps props,Iterator<? extends VertexComponent> iterator){
  if (!(renderer instanceof GL2Viewer)) {
    return;
  }
  GL2Viewer viewer=(GL2Viewer)renderer;
  GL2 gl=viewer.getGL2();
  gl.glPushMatrix();
  Shading savedShading=renderer.setPointShading(props);
  renderer.setPointColoring(props,false);
switch (props.getPointStyle()) {
case POINT:
{
      renderer.setPointSize(props.getPointSize());
      if (renderer.isSelecting()) {
        int i=0;
        while (iterator.hasNext()) {
          VertexComponent pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            if (renderer.isSelectable(pnt)) {
              renderer.beginSelectionQuery(i);
              gl.glBegin(GL2.GL_POINTS);
              gl.glVertex3fv(pnt.getRenderCoords(),0);
              gl.glEnd();
              renderer.endSelectionQuery();
            }
          }
          i++;
        }
      }
 else {
        gl.glBegin(GL2.GL_POINTS);
        while (iterator.hasNext()) {
          VertexComponent pnt=iterator.next();
          if (pnt.getRenderProps() == null) {
            renderer.setPointColoring(props,pnt.isSelected());
            gl.glVertex3fv(pnt.getRenderCoords(),0);
          }
        }
        gl.glEnd();
      }
      renderer.setPointSize(1);
      break;
    }
case CUBE:
{
    int i=0;
    double width=2 * props.getPointRadius();
    while (iterator.hasNext()) {
      VertexComponent pnt=iterator.next();
      if (pnt.getRenderProps() == null) {
        if (renderer.isSelecting()) {
          if (renderer.isSelectable(pnt)) {
            renderer.beginSelectionQuery(i);
            renderer.drawCube(pnt.getRenderCoords(),width);
            renderer.endSelectionQuery();
          }
        }
 else {
          renderer.setPointColoring(props,pnt.isSelected());
          renderer.drawCube(pnt.getRenderCoords(),width);
        }
      }
      i++;
    }
    break;
  }
case SPHERE:
{
  int i=0;
  double rad=props.getPointRadius();
  while (iterator.hasNext()) {
    VertexComponent pnt=iterator.next();
    if (pnt.getRenderProps() == null) {
      if (renderer.isSelecting()) {
        if (renderer.isSelectable(pnt)) {
          renderer.beginSelectionQuery(i);
          renderer.drawSphere(pnt.getRenderCoords(),rad);
          renderer.endSelectionQuery();
        }
      }
 else {
        renderer.setPointColoring(props,pnt.isSelected());
        renderer.drawSphere(pnt.getRenderCoords(),rad);
      }
    }
    i++;
  }
  break;
}
}
renderer.setShading(savedShading);
gl.glPopMatrix();
}