Program: 70890
Project: 70890
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();
    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;
}

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 lineCount2=2 * (lineGroupOffsets[oidx + 1] - lineGroupOffsets[oidx]);
  int aidx=0;
  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.VERTEX_POSITION,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,pinfo.stride,lineCount2);
    aidx++;
  }
  if (nidx >= 0) {
    AttributeInfo ninfo=normalInfo[nidx];
    BufferObject vbo=vbos[ninfo.vboIndex];
    BufferStorage bs=normalPutter.storage();
    int offset=ninfo.offset + 2 * lineGroupOffsets[oidx] * ninfo.stride;
    attribs[aidx]=new GL3VertexAttributeArray(vbo,GL3VertexAttribute.VERTEX_NORMAL,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,ninfo.stride,lineCount2);
    aidx++;
  }
  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.VERTEX_COLOR,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,cinfo.stride,lineCount2);
    aidx++;
  }
  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.VERTEX_TEXTURE,GL3Util.getGLType(bs.type()),bs.size(),bs.isNormalized(),offset,tinfo.stride,lineCount2);
    aidx++;
  }
  GL3Object glo=new GL3Object(gl,attribs,null,GL.GL_LINES);
  return glo;
}