Program: 70888
Project: 70888
Buggy source:
private GL3Object buildObjectGLO(GL3 gl,RenderObject robj,int pidx,int nidx,int cidx,int tidx,int oidx,AttributeInfo[] radiusLengthInfo,GL3Object object,boolean hasLengthOffset){
  GL3VertexAttributeArray[] pattribs=object.getGL3VertexAttributes();
  int nattribs=pattribs.length;
  nattribs++;
  if (hasLengthOffset) {
    nattribs++;
  }
  if (pidx >= 0) {
    nattribs+=2;
  }
  if (cidx >= 0) {
    nattribs+=2;
  }
  if (tidx >= 0) {
    tidx+=2;
  }
  GL3VertexAttributeArray[] attribs=new GL3VertexAttributeArray[nattribs];
  for (int i=0; i < pattribs.length; ++i) {
    attribs[i]=pattribs[i];
  }
  int aidx=pattribs.length;
  attribs[aidx++]=new GL3VertexAttributeArray(vbos[radiusLengthInfo[0].vboIndex],GL3VertexAttribute.LINE_RADIUS,GL.GL_FLOAT,1,false,radiusLengthInfo[0].offset,radiusLengthInfo[0].stride,radiusLengthInfo[0].count,robj.numLines(oidx));
  if (hasLengthOffset) {
    attribs[aidx++]=new GL3VertexAttributeArray(vbos[radiusLengthInfo[1].vboIndex],GL3VertexAttribute.LINE_LENGTH_OFFSET,GL.GL_FLOAT,4,false,radiusLengthInfo[1].offset,radiusLengthInfo[1].stride,radiusLengthInfo[1].count,robj.numLines(oidx));
  }
  if (pidx >= 0) {
    AttributeInfo pinfo=positionInfo[pidx];
    BufferObject vbo=vbos[pinfo.vboIndex];
    BufferStorage bs=positionPutter.storage();
    int offset=pinfo.offset + lineGroupOffsets[oidx] * pinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * pinfo.stride,pinfo.count / 2,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + pinfo.stride,2 * pinfo.stride,pinfo.count / 2,1);
  }
  if (cidx >= 0) {
    AttributeInfo cinfo=colorInfo[cidx];
    BufferObject vbo=vbos[cinfo.vboIndex];
    BufferStorage bs=colorPutter.storage();
    int offset=cinfo.offset + lineGroupOffsets[oidx] * cinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * cinfo.stride,cinfo.count / 2,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + cinfo.stride,2 * cinfo.stride,cinfo.count / 2,1);
  }
  if (tidx >= 0) {
    AttributeInfo tinfo=textureInfo[tidx];
    BufferObject vbo=vbos[tinfo.vboIndex];
    BufferStorage bs=texturePutter.storage();
    int offset=tinfo.offset + lineGroupOffsets[oidx] * tinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * tinfo.stride,tinfo.count / 2,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + tinfo.stride,2 * tinfo.stride,tinfo.count / 2,1);
  }
  GL3Object glo=new GL3Object(gl,attribs,object.getGL3ElementAttribute());
  glo.setDrawInfo(object.getStart(),object.getCount(),object.getMode(),robj.numLines(oidx));
  return glo;
}

Fixed version (ground truth):
private GL3Object buildObjectGLO(GL3 gl,RenderObject robj,int pidx,int nidx,int cidx,int tidx,int oidx,AttributeInfo[] radiusLengthInfo,GL3Object object,boolean hasLengthOffset){
  GL3VertexAttributeArray[] pattribs=object.getGL3VertexAttributes();
  int nattribs=pattribs.length;
  nattribs++;
  if (hasLengthOffset) {
    nattribs++;
  }
  if (pidx >= 0) {
    nattribs+=2;
  }
  if (cidx >= 0) {
    nattribs+=2;
  }
  if (tidx >= 0) {
    tidx+=2;
  }
  int lineCount=lineGroupOffsets[oidx + 1] - lineGroupOffsets[oidx];
  GL3VertexAttributeArray[] attribs=new GL3VertexAttributeArray[nattribs];
  for (int i=0; i < pattribs.length; ++i) {
    attribs[i]=pattribs[i];
  }
  int aidx=pattribs.length;
  attribs[aidx++]=new GL3VertexAttributeArray(vbos[radiusLengthInfo[0].vboIndex],GL3VertexAttribute.LINE_RADIUS,GL.GL_FLOAT,1,false,radiusLengthInfo[0].offset,radiusLengthInfo[0].stride,radiusLengthInfo[0].count,lineCount);
  if (hasLengthOffset) {
    attribs[aidx++]=new GL3VertexAttributeArray(vbos[radiusLengthInfo[1].vboIndex],GL3VertexAttribute.LINE_LENGTH_OFFSET,GL.GL_FLOAT,4,false,radiusLengthInfo[1].offset,radiusLengthInfo[1].stride,radiusLengthInfo[1].count,lineCount);
  }
  if (pidx >= 0) {
    AttributeInfo pinfo=positionInfo[pidx];
    BufferObject vbo=vbos[pinfo.vboIndex];
    BufferStorage bs=positionPutter.storage();
    int offset=pinfo.offset + 2 * lineGroupOffsets[oidx] * pinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * pinfo.stride,lineCount,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + pinfo.stride,2 * pinfo.stride,lineCount,1);
  }
  if (cidx >= 0) {
    AttributeInfo cinfo=colorInfo[cidx];
    BufferObject vbo=vbos[cinfo.vboIndex];
    BufferStorage bs=colorPutter.storage();
    int offset=cinfo.offset + 2 * lineGroupOffsets[oidx] * cinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * cinfo.stride,lineCount,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + cinfo.stride,2 * cinfo.stride,lineCount,1);
  }
  if (tidx >= 0) {
    AttributeInfo tinfo=textureInfo[tidx];
    BufferObject vbo=vbos[tinfo.vboIndex];
    BufferStorage bs=texturePutter.storage();
    int offset=tinfo.offset + 2 * lineGroupOffsets[oidx] * tinfo.stride;
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_BOTTOM_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,2 * tinfo.stride,lineCount,1);
    attribs[aidx++]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.LINE_TOP_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset + tinfo.stride,2 * tinfo.stride,lineCount,1);
  }
  GL3Object glo=new GL3Object(gl,attribs,object.getGL3ElementAttribute());
  glo.setDrawInfo(object.getStart(),object.getCount(),object.getMode(),lineCount);
  return glo;
}