Program: 70797
Project: 70797
Buggy source:
private void drawSolidLines(RenderObject robj,int gidx,LineStyle style,float rad){
  int lineCount=robj.numLines(gidx);
  if (lineCount == 0) {
    return;
  }
  boolean selecting=isSelecting();
  boolean hasColors=(robj.hasColors() && hasVertexColoring());
  boolean useColors=hasColors && !selecting;
  boolean useHSV=isHSVColorInterpolationEnabled() && !isLightingEnabled();
  if (useColors) {
    gl.glColorMaterial(GL2.GL_FRONT_AND_BACK,GL2.GL_AMBIENT_AND_DIFFUSE);
    if (!myHighlightColorActive) {
      gl.glEnable(GL2.GL_COLOR_MATERIAL);
    }
    if (useHSV) {
      useHSV=setupHSVInterpolation(gl);
    }
  }
  boolean useDisplayList=!selecting || !hasColors;
  GL2VersionedObject gvo=null;
  RenderObjectKey key=new RenderObjectKey(robj.getIdentifier(),DrawType.LINES,gidx);
  LineFingerPrint fingerprint=new LineFingerPrint(robj.getVersionInfo(),style,mySurfaceResolution,rad);
  boolean compile=true;
  if (useDisplayList) {
    gvo=myGLResources.getVersionedObject(key);
    if (gvo != null) {
      boolean iv=gvo.disposeInvalid(gl);
      if (iv == true) {
        System.out.println("String_Node_Str" + gvo);
      }
    }
    if (gvo == null || gvo.disposeInvalid(gl)) {
      gvo=myGLResources.allocateVersionedObject(gl,key,fingerprint);
      compile=true;
    }
 else {
      compile=!(gvo.compareExchangeFingerPrint(fingerprint));
    }
  }
  if (compile) {
    if (gvo != null) {
      gvo.beginCompile(gl);
    }
    robj.readLock();
    int[] lines=robj.getLines(gidx);
    int lineStride=robj.getLineStride();
switch (style) {
case CYLINDER:
{
        if (!selecting && useColors) {
          for (int i=0; i < lineCount; ++i) {
            int baseIdx=lineStride * i;
            int vidx1=lines[baseIdx];
            int vidx2=lines[baseIdx + 1];
            float[] p0=robj.getVertexPosition(vidx1);
            byte[] c0=robj.getVertexColor(vidx1);
            float[] p1=robj.getVertexPosition(vidx2);
            byte[] c1=robj.getVertexColor(vidx2);
            drawColoredCylinder(gl,mySurfaceResolution,rad,rad,p0,c0,p1,c1,true,useHSV);
          }
        }
 else {
          for (int i=0; i < lineCount; ++i) {
            int baseIdx=lineStride * i;
            int vidx1=lines[baseIdx];
            int vidx2=lines[baseIdx + 1];
            float[] p0=robj.getVertexPosition(vidx1);
            float[] p1=robj.getVertexPosition(vidx2);
            drawCylinder(gl,mySurfaceResolution,rad,rad,p0,p1,true);
          }
        }
        break;
      }
case SPINDLE:
    if (!selecting && useColors) {
      for (int i=0; i < lineCount; ++i) {
        int baseIdx=lineStride * i;
        int vidx1=lines[baseIdx];
        int vidx2=lines[baseIdx + 1];
        float[] p0=robj.getVertexPosition(vidx1);
        byte[] c0=robj.getVertexColor(vidx1);
        float[] p1=robj.getVertexPosition(vidx2);
        byte[] c1=robj.getVertexColor(vidx2);
        drawColoredSpindle(gl,mySurfaceResolution,rad,p0,c0,p1,c1,isHSVColorInterpolationEnabled());
      }
    }
 else {
      for (int i=0; i < lineCount; ++i) {
        int baseIdx=lineStride * i;
        int vidx1=lines[baseIdx];
        int vidx2=lines[baseIdx + 1];
        float[] p0=robj.getVertexPosition(vidx1);
        float[] p1=robj.getVertexPosition(vidx2);
        drawSpindle(gl,mySurfaceResolution,rad,p0,p1);
      }
    }
  break;
case SOLID_ARROW:
{
  float arad=rad * 3;
  float aheight=arad * 2;
  if (!selecting && useColors) {
    for (int i=0; i < lineCount; ++i) {
      int baseIdx=lineStride * i;
      int vidx1=lines[baseIdx];
      int vidx2=lines[baseIdx + 1];
      float[] p0=robj.getVertexPosition(vidx1);
      byte[] c0=robj.getVertexColor(vidx1);
      float[] p1=robj.getVertexPosition(vidx2);
      byte[] c1=robj.getVertexColor(vidx2);
      drawColoredArrow(gl,mySurfaceResolution,rad,arad,aheight,p0,c0,p1,c1,isHSVColorInterpolationEnabled(),true);
    }
  }
 else {
    for (int i=0; i < lineCount; ++i) {
      int baseIdx=lineStride * i;
      int vidx1=lines[baseIdx];
      int vidx2=lines[baseIdx + 1];
      float[] p0=robj.getVertexPosition(vidx1);
      float[] p1=robj.getVertexPosition(vidx2);
      drawArrow(gl,mySurfaceResolution,rad,arad,aheight,p0,p1,true);
    }
  }
  break;
}
default :
}
robj.readUnlock();
if (gvo != null) {
gvo.endCompile(gl);
gvo.draw(gl);
}
}
 else {
gvo.draw(gl);
}
if (useColors) {
gl.glDisable(GL2.GL_COLOR_MATERIAL);
if (useHSV) {
gl.glUseProgramObjectARB(0);
}
}
}

Fixed version (ground truth):
private void drawSolidLines(RenderObject robj,int gidx,LineStyle style,float rad){
  int lineCount=robj.numLines(gidx);
  if (lineCount == 0) {
    return;
  }
  boolean selecting=isSelecting();
  boolean hasColors=(robj.hasColors() && hasVertexColoring());
  boolean useColors=hasColors && !selecting;
  boolean useHSV=isHSVColorInterpolationEnabled();
  if (useColors) {
    gl.glColorMaterial(GL2.GL_FRONT_AND_BACK,GL2.GL_AMBIENT_AND_DIFFUSE);
    if (!myHighlightColorActive) {
      gl.glEnable(GL2.GL_COLOR_MATERIAL);
    }
    if (useHSV) {
      useHSV=setupHSVInterpolation(gl);
    }
  }
  boolean useDisplayList=!selecting || !hasColors;
  GL2VersionedObject gvo=null;
  RenderObjectKey key=new RenderObjectKey(robj.getIdentifier(),DrawType.LINES,gidx);
  LineFingerPrint fingerprint=new LineFingerPrint(robj.getVersionInfo(),style,mySurfaceResolution,rad);
  boolean compile=true;
  if (useDisplayList) {
    gvo=myGLResources.getVersionedObject(key);
    if (gvo != null) {
      boolean iv=gvo.disposeInvalid(gl);
      if (iv == true) {
        System.out.println("String_Node_Str" + gvo);
      }
    }
    if (gvo == null || gvo.disposeInvalid(gl)) {
      gvo=myGLResources.allocateVersionedObject(gl,key,fingerprint);
      compile=true;
    }
 else {
      compile=!(gvo.compareExchangeFingerPrint(fingerprint));
    }
  }
  if (compile) {
    if (gvo != null) {
      gvo.beginCompile(gl);
    }
    robj.readLock();
    int[] lines=robj.getLines(gidx);
    int lineStride=robj.getLineStride();
switch (style) {
case CYLINDER:
{
        if (!selecting && useColors) {
          for (int i=0; i < lineCount; ++i) {
            int baseIdx=lineStride * i;
            int vidx1=lines[baseIdx];
            int vidx2=lines[baseIdx + 1];
            float[] p0=robj.getVertexPosition(vidx1);
            byte[] c0=robj.getVertexColor(vidx1);
            float[] p1=robj.getVertexPosition(vidx2);
            byte[] c1=robj.getVertexColor(vidx2);
            drawColoredCylinder(gl,mySurfaceResolution,rad,rad,p0,c0,p1,c1,true,useHSV);
          }
        }
 else {
          for (int i=0; i < lineCount; ++i) {
            int baseIdx=lineStride * i;
            int vidx1=lines[baseIdx];
            int vidx2=lines[baseIdx + 1];
            float[] p0=robj.getVertexPosition(vidx1);
            float[] p1=robj.getVertexPosition(vidx2);
            drawCylinder(gl,mySurfaceResolution,rad,rad,p0,p1,true);
          }
        }
        break;
      }
case SPINDLE:
    if (!selecting && useColors) {
      for (int i=0; i < lineCount; ++i) {
        int baseIdx=lineStride * i;
        int vidx1=lines[baseIdx];
        int vidx2=lines[baseIdx + 1];
        float[] p0=robj.getVertexPosition(vidx1);
        byte[] c0=robj.getVertexColor(vidx1);
        float[] p1=robj.getVertexPosition(vidx2);
        byte[] c1=robj.getVertexColor(vidx2);
        drawColoredSpindle(gl,mySurfaceResolution,rad,p0,c0,p1,c1,isHSVColorInterpolationEnabled());
      }
    }
 else {
      for (int i=0; i < lineCount; ++i) {
        int baseIdx=lineStride * i;
        int vidx1=lines[baseIdx];
        int vidx2=lines[baseIdx + 1];
        float[] p0=robj.getVertexPosition(vidx1);
        float[] p1=robj.getVertexPosition(vidx2);
        drawSpindle(gl,mySurfaceResolution,rad,p0,p1);
      }
    }
  break;
case SOLID_ARROW:
{
  float arad=rad * 3;
  float aheight=arad * 2;
  if (!selecting && useColors) {
    for (int i=0; i < lineCount; ++i) {
      int baseIdx=lineStride * i;
      int vidx1=lines[baseIdx];
      int vidx2=lines[baseIdx + 1];
      float[] p0=robj.getVertexPosition(vidx1);
      byte[] c0=robj.getVertexColor(vidx1);
      float[] p1=robj.getVertexPosition(vidx2);
      byte[] c1=robj.getVertexColor(vidx2);
      drawColoredArrow(gl,mySurfaceResolution,rad,arad,aheight,p0,c0,p1,c1,isHSVColorInterpolationEnabled(),true);
    }
  }
 else {
    for (int i=0; i < lineCount; ++i) {
      int baseIdx=lineStride * i;
      int vidx1=lines[baseIdx];
      int vidx2=lines[baseIdx + 1];
      float[] p0=robj.getVertexPosition(vidx1);
      float[] p1=robj.getVertexPosition(vidx2);
      drawArrow(gl,mySurfaceResolution,rad,arad,aheight,p0,p1,true);
    }
  }
  break;
}
default :
}
robj.readUnlock();
if (gvo != null) {
gvo.endCompile(gl);
gvo.draw(gl);
}
}
 else {
gvo.draw(gl);
}
if (useColors) {
gl.glDisable(GL2.GL_COLOR_MATERIAL);
if (useHSV) {
gl.glUseProgramObjectARB(0);
}
}
}