Program: 56943
Project: 56943
Buggy source:
private void renderPathway(final GL2 gl,final PathwayGraph pathway){
  if (!initShader) {
    try {
      initShaders(gl);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  gl.glPushMatrix();
  gl.glTranslatef(vecTranslation.x(),vecTranslation.y(),vecTranslation.z());
  gl.glScalef(vecScaling.x(),vecScaling.y(),vecScaling.z());
  float textureOffset=0.0f;
  if (enablePathwayTexture) {
    float fPathwayTransparency=1.0f;
    pathwayTextureManager.renderPathway(gl,this,pathway,fPathwayTransparency,false);
  }
  float pathwayHeight=pixelGLConverter.getGLHeightForPixelHeight(pathway.getHeight());
  gl.glEnable(GL.GL_STENCIL_TEST);
  gl.glClearStencil(0);
  gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
  textureOffset+=PathwayRenderStyle.Z_OFFSET;
  gl.glTranslatef(0,pathwayHeight,textureOffset);
  if (!this.highlightVertices)   augmentationRenderer.setVisible(false);
  augmentationRenderer.renderPathway(gl,pathway,false);
  gl.glTranslatef(0,-pathwayHeight,-textureOffset);
  if (enablePathwayTexture) {
    float fPathwayTransparency=1.0f;
    textureOffset+=PathwayRenderStyle.Z_OFFSET;
    gl.glTranslatef(0.0f,0.0f,textureOffset);
    gl.glEnable(GL.GL_STENCIL_TEST);
    gl.glDisable(GL.GL_DEPTH_TEST);
    gl.glStencilFunc(GL.GL_GREATER,2,0xff);
    gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
    gl.glPushName(generalManager.getViewManager().getPickingManager().getPickingID(uniqueID,EPickingType.PATHWAY_TEXTURE_SELECTION.name(),0));
    pathwayTextureManager.renderPathway(gl,this,pathway,fPathwayTransparency,false);
    gl.glPopName();
    gl.glStencilFunc(GL.GL_GREATER,1,0xff);
    gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
    textureOffset-=2f * PathwayRenderStyle.Z_OFFSET;
    gl.glTranslatef(0.0f,0.0f,textureOffset);
    overlayContextBubbleSets(gl);
    overlayBubbleSets(gl);
    gl.glEnable(GL.GL_DEPTH_TEST);
    gl.glDisable(GL.GL_STENCIL_TEST);
  }
  gl.glScalef(1 / vecScaling.x(),1 / vecScaling.y(),1 / vecScaling.z());
  gl.glTranslatef(-vecTranslation.x(),-vecTranslation.y(),-vecTranslation.z());
  gl.glDisable(GL.GL_STENCIL_TEST);
  gl.glPopMatrix();
}

Fixed version (ground truth):
private void renderPathway(final GL2 gl,final PathwayGraph pathway){
  if (!initShader) {
    try {
      initShaders(gl);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
  gl.glPushMatrix();
  gl.glTranslatef(vecTranslation.x(),vecTranslation.y(),vecTranslation.z());
  gl.glScalef(vecScaling.x(),vecScaling.y(),vecScaling.z());
  float textureOffset=0.0f;
  if (enablePathwayTexture) {
    float fPathwayTransparency=1.0f;
    pathwayTextureManager.renderPathway(gl,this,pathway,fPathwayTransparency,false);
  }
  float pathwayHeight=pixelGLConverter.getGLHeightForPixelHeight(pathway.getHeight());
  gl.glEnable(GL.GL_STENCIL_TEST);
  gl.glClearStencil(0);
  gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
  textureOffset+=PathwayRenderStyle.Z_OFFSET;
  gl.glTranslatef(0,pathwayHeight,textureOffset);
  augmentationRenderer.renderPathway(gl,pathway,false);
  gl.glTranslatef(0,-pathwayHeight,-textureOffset);
  if (enablePathwayTexture) {
    float fPathwayTransparency=1.0f;
    textureOffset+=PathwayRenderStyle.Z_OFFSET;
    gl.glTranslatef(0.0f,0.0f,textureOffset);
    gl.glEnable(GL.GL_STENCIL_TEST);
    gl.glDisable(GL.GL_DEPTH_TEST);
    gl.glStencilFunc(GL.GL_GREATER,2,0xff);
    gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
    gl.glPushName(generalManager.getViewManager().getPickingManager().getPickingID(uniqueID,EPickingType.PATHWAY_TEXTURE_SELECTION.name(),0));
    pathwayTextureManager.renderPathway(gl,this,pathway,fPathwayTransparency,false);
    gl.glPopName();
    gl.glStencilFunc(GL.GL_GREATER,1,0xff);
    gl.glStencilOp(GL.GL_KEEP,GL.GL_KEEP,GL.GL_KEEP);
    textureOffset-=2f * PathwayRenderStyle.Z_OFFSET;
    gl.glTranslatef(0.0f,0.0f,textureOffset);
    overlayContextBubbleSets(gl);
    overlayBubbleSets(gl);
    gl.glEnable(GL.GL_DEPTH_TEST);
    gl.glDisable(GL.GL_STENCIL_TEST);
  }
  gl.glScalef(1 / vecScaling.x(),1 / vecScaling.y(),1 / vecScaling.z());
  gl.glTranslatef(-vecTranslation.x(),-vecTranslation.y(),-vecTranslation.z());
  gl.glDisable(GL.GL_STENCIL_TEST);
  gl.glPopMatrix();
}