Program: 70871
Project: 70871
Buggy source:
@Override public void drawVertices(RenderObject robj,VertexDrawMode mode){
  maybeUpdateState(gl);
  boolean enableLighting=false;
  if (isLightingEnabled() && !robj.hasNormals()) {
    enableLighting=true;
    setLightingEnabled(false);
  }
  boolean selecting=isSelecting();
  boolean hasColors=(robj.hasColors() && isVertexColoringEnabled());
  boolean useColors=hasColors && !selecting;
  boolean useHSV=isHSVColorInterpolationEnabled() && !isLightingEnabled();
  if (useColors) {
    gl.glColorMaterial(GL2.GL_FRONT_AND_BACK,GL2.GL_AMBIENT_AND_DIFFUSE);
    gl.glEnable(GL2.GL_COLOR_MATERIAL);
    if (useHSV) {
      useHSV=setupHSVInterpolation(gl);
    }
  }
  boolean useDisplayList=!selecting || !hasColors;
  DisplayListPassport dlpp=null;
  RenderObjectKey key=new RenderObjectKey(robj,DrawType.VERTICES);
  VertexFingerPrint fingerprint=new VertexFingerPrint(robj.getVersionInfo(),mode);
  boolean compile=true;
  if (useDisplayList) {
    dlpp=myGLResources.getDisplayListPassport(gl,key);
    if (dlpp == null) {
      dlpp=myGLResources.allocateDisplayListPassport(gl,key,fingerprint);
      compile=true;
    }
 else {
      compile=!(dlpp.compareExchangeFingerPrint(fingerprint));
    }
  }
  if (compile) {
    if (dlpp != null) {
      gl.glNewList(dlpp.getList(),GL2.GL_COMPILE);
    }
switch (mode) {
case LINES:
      gl.glBegin(GL2.GL_LINES);
    break;
case LINE_LOOP:
  gl.glBegin(GL2.GL_LINE_LOOP);
break;
case LINE_STRIP:
gl.glBegin(GL2.GL_LINE_STRIP);
break;
case POINTS:
gl.glBegin(GL2.GL_POINTS);
break;
case TRIANGLES:
gl.glBegin(GL2.GL_TRIANGLES);
break;
case TRIANGLE_FAN:
gl.glBegin(GL2.GL_TRIANGLE_FAN);
break;
case TRIANGLE_STRIP:
gl.glBegin(GL2.GL_TRIANGLE_STRIP);
break;
default :
gl.glBegin(GL2.GL_POINTS);
break;
}
for (VertexIndexSet v : robj.getVertices()) {
if (!selecting && useColors) {
setVertexColor(gl,robj.getColor(v.getColorIndex()),useHSV);
}
if (robj.hasNormals()) {
gl.glNormal3fv(robj.getNormal(v.getNormalIndex()),0);
}
gl.glVertex3fv(robj.getPosition(v.getPositionIndex()),0);
}
gl.glEnd();
if (dlpp != null) {
gl.glEndList();
gl.glCallList(dlpp.getList());
}
}
 else {
gl.glCallList(dlpp.getList());
}
if (useColors) {
gl.glDisable(GL2.GL_COLOR_MATERIAL);
if (useHSV) {
gl.glUseProgramObjectARB(0);
}
}
if (enableLighting) {
setLightingEnabled(true);
}
}

Fixed version (ground truth):
@Override public void drawVertices(RenderObject robj,VertexDrawMode mode){
  maybeUpdateState(gl);
  boolean enableLighting=false;
  if (isLightingEnabled() && !robj.hasNormals()) {
    enableLighting=true;
    setLightingEnabled(false);
  }
  boolean selecting=isSelecting();
  boolean hasColors=(robj.hasColors() && isVertexColoringEnabled());
  boolean useColors=hasColors && !selecting;
  boolean useHSV=isHSVColorInterpolationEnabled() && !isLightingEnabled();
  if (useColors) {
    gl.glColorMaterial(GL2.GL_FRONT_AND_BACK,GL2.GL_AMBIENT_AND_DIFFUSE);
    if (!mySelectedColorActive) {
      gl.glEnable(GL2.GL_COLOR_MATERIAL);
    }
    if (useHSV) {
      useHSV=setupHSVInterpolation(gl);
    }
  }
  boolean useDisplayList=!selecting || !hasColors;
  DisplayListPassport dlpp=null;
  RenderObjectKey key=new RenderObjectKey(robj,DrawType.VERTICES);
  VertexFingerPrint fingerprint=new VertexFingerPrint(robj.getVersionInfo(),mode);
  boolean compile=true;
  if (useDisplayList) {
    dlpp=myGLResources.getDisplayListPassport(gl,key);
    if (dlpp == null) {
      dlpp=myGLResources.allocateDisplayListPassport(gl,key,fingerprint);
      compile=true;
    }
 else {
      compile=!(dlpp.compareExchangeFingerPrint(fingerprint));
    }
  }
  if (compile) {
    if (dlpp != null) {
      gl.glNewList(dlpp.getList(),GL2.GL_COMPILE);
    }
switch (mode) {
case LINES:
      gl.glBegin(GL2.GL_LINES);
    break;
case LINE_LOOP:
  gl.glBegin(GL2.GL_LINE_LOOP);
break;
case LINE_STRIP:
gl.glBegin(GL2.GL_LINE_STRIP);
break;
case POINTS:
gl.glBegin(GL2.GL_POINTS);
break;
case TRIANGLES:
gl.glBegin(GL2.GL_TRIANGLES);
break;
case TRIANGLE_FAN:
gl.glBegin(GL2.GL_TRIANGLE_FAN);
break;
case TRIANGLE_STRIP:
gl.glBegin(GL2.GL_TRIANGLE_STRIP);
break;
default :
gl.glBegin(GL2.GL_POINTS);
break;
}
for (VertexIndexSet v : robj.getVertices()) {
if (!selecting && useColors) {
setVertexColor(gl,robj.getColor(v.getColorIndex()),useHSV);
}
if (robj.hasNormals()) {
gl.glNormal3fv(robj.getNormal(v.getNormalIndex()),0);
}
gl.glVertex3fv(robj.getPosition(v.getPositionIndex()),0);
}
gl.glEnd();
if (dlpp != null) {
gl.glEndList();
gl.glCallList(dlpp.getList());
}
}
 else {
gl.glCallList(dlpp.getList());
}
if (useColors) {
gl.glDisable(GL2.GL_COLOR_MATERIAL);
if (useHSV) {
gl.glUseProgramObjectARB(0);
}
}
if (enableLighting) {
setLightingEnabled(true);
}
}