Program: 70929
Project: 70929
Buggy source:
private GL3Object buildLineGLO(GL3 gl,int pidx,int nidx,int cidx,int tidx,int oidx){
  int nattribs=0;
  if (pidx >= 0) {
    nattribs++;
  }
  if (nidx >= 0) {
    nattribs++;
  }
  if (cidx >= 0) {
    nattribs++;
  }
  if (tidx >= 0) {
    tidx++;
  }
  GL3VertexAttributeArray[] attribs=new GL3VertexAttributeArray[nattribs];
  int aidx=0;
  if (pidx >= 0) {
    AttributeInfo pinfo=positionInfo[pidx];
    BufferObject vbo=vbos[pinfo.vboIndex];
    BufferStorage bs=positionPutter.storage();
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),pinfo.offset,pinfo.stride,pinfo.count);
    aidx++;
  }
  if (nidx >= 0) {
    AttributeInfo ninfo=normalInfo[nidx];
    BufferObject vbo=vbos[ninfo.vboIndex];
    BufferStorage bs=normalPutter.storage();
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_NORMAL,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),ninfo.offset,ninfo.stride,ninfo.count);
    aidx++;
  }
  if (cidx >= 0) {
    AttributeInfo cinfo=colorInfo[cidx];
    BufferObject vbo=vbos[cinfo.vboIndex];
    BufferStorage bs=colorPutter.storage();
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),cinfo.offset,cinfo.stride,cinfo.count);
    aidx++;
  }
  if (tidx >= 0) {
    AttributeInfo tinfo=textureInfo[tidx];
    BufferObject vbo=vbos[tinfo.vboIndex];
    BufferStorage bs=texturePutter.storage();
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),tinfo.offset,tinfo.stride,tinfo.count);
    aidx++;
  }
  GL3Object glo=new GL3Object(gl,attribs,null,GL.GL_LINES);
  return glo;
}

Fixed version (ground truth):
private GL3Object buildLineGLO(GL3 gl,int pidx,int nidx,int cidx,int tidx,int oidx){
  int nattribs=0;
  if (pidx >= 0) {
    nattribs++;
  }
  if (nidx >= 0) {
    nattribs++;
  }
  if (cidx >= 0) {
    nattribs++;
  }
  if (tidx >= 0) {
    tidx++;
  }
  GL3VertexAttributeArray[] attribs=new GL3VertexAttributeArray[nattribs];
  int aidx=0;
  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.VERTEX_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,pinfo.stride,pinfo.count);
    aidx++;
  }
  if (nidx >= 0) {
    AttributeInfo ninfo=normalInfo[nidx];
    BufferObject vbo=vbos[ninfo.vboIndex];
    BufferStorage bs=normalPutter.storage();
    int offset=ninfo.offset + lineGroupOffsets[oidx] * ninfo.stride;
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_NORMAL,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,ninfo.stride,ninfo.count);
    aidx++;
  }
  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.VERTEX_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,cinfo.stride,cinfo.count);
    aidx++;
  }
  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.VERTEX_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,tinfo.stride,tinfo.count);
    aidx++;
  }
  GL3Object glo=new GL3Object(gl,attribs,null,GL.GL_LINES);
  return glo;
}