Program: 57890
Project: 57890
Buggy source:
/** 
 * Render the first stage of the hierarchy (OverviewBar)
 * @param gl
 */
private void renderLevel1(GL2 gl){
  float fHeight;
  float fWidth;
  float fyOffset=0.0f;
  fHeight=viewFrustum.getHeight();
  fWidth=renderStyle.getWidthLevel1();
  float fHeightElem=fHeight / iNumberOfElements;
  float fStep=0;
  gl.glColor4f(1f,1f,0f,1f);
  for (int i=0; i < iNrTextures; i++) {
    fStep=fHeightElem * numberSamples.get(iNrTextures - i - 1);
    textures.get(iNrTextures - i - 1).enable();
    textures.get(iNrTextures - i - 1).bind();
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_S,GL2.GL_CLAMP);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_T,GL2.GL_CLAMP);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MAG_FILTER,GL2.GL_NEAREST);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MIN_FILTER,GL2.GL_NEAREST);
    TextureCoords texCoords=textures.get(iNrTextures - i - 1).getImageTexCoords();
    gl.glPushName(pickingManager.getPickingID(uniqueID,PickingType.HEAT_MAP_TEXTURE_SELECTION,iNrTextures - i));
    gl.glBegin(GL2.GL_QUADS);
    gl.glTexCoord2d(texCoords.left(),texCoords.top());
    gl.glVertex3f(0,fyOffset,0);
    gl.glTexCoord2d(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0,fyOffset + fStep,0);
    gl.glTexCoord2d(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth,fyOffset + fStep,0);
    gl.glTexCoord2d(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,fyOffset,0);
    gl.glEnd();
    gl.glPopName();
    fyOffset+=fStep;
    textures.get(iNrTextures - i - 1).disable();
  }
}

Fixed version (ground truth):
/** 
 * Render the first stage of the hierarchy (OverviewBar)
 * @param gl
 */
private void renderLevel1(GL2 gl){
  float fHeight;
  float fWidth;
  float fyOffset=0.0f;
  fHeight=viewFrustum.getHeight();
  fWidth=renderStyle.getWidthLevel1();
  float fHeightElem=fHeight / iNumberOfElements;
  float fStep=0;
  gl.glColor4f(1f,1f,0f,1f);
  for (int i=0; i < iNrTextures; i++) {
    fStep=fHeightElem * numberSamples.get(iNrTextures - i - 1);
    textures.get(iNrTextures - i - 1).enable();
    textures.get(iNrTextures - i - 1).bind();
    gl.glTexEnvi(GL2.GL_TEXTURE_ENV,GL2.GL_TEXTURE_ENV_MODE,GL2.GL_DECAL);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_S,GL2.GL_CLAMP);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_WRAP_T,GL2.GL_CLAMP);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MAG_FILTER,GL2.GL_NEAREST);
    gl.glTexParameteri(GL2.GL_TEXTURE_2D,GL2.GL_TEXTURE_MIN_FILTER,GL2.GL_NEAREST);
    TextureCoords texCoords=textures.get(iNrTextures - i - 1).getImageTexCoords();
    gl.glPushName(pickingManager.getPickingID(uniqueID,PickingType.HEAT_MAP_TEXTURE_SELECTION,iNrTextures - i));
    gl.glBegin(GL2.GL_QUADS);
    gl.glTexCoord2d(texCoords.left(),texCoords.top());
    gl.glVertex3f(0,fyOffset,0);
    gl.glTexCoord2d(texCoords.left(),texCoords.bottom());
    gl.glVertex3f(0,fyOffset + fStep,0);
    gl.glTexCoord2d(texCoords.right(),texCoords.bottom());
    gl.glVertex3f(fWidth,fyOffset + fStep,0);
    gl.glTexCoord2d(texCoords.right(),texCoords.top());
    gl.glVertex3f(fWidth,fyOffset,0);
    gl.glEnd();
    gl.glPopName();
    fyOffset+=fStep;
    textures.get(iNrTextures - i - 1).disable();
  }
}