Program: 163792
Project: 163792
Buggy source:
/** 
 * In the current implementation, start and stop are ignored (in OpenGL). This will obviously have to be revisited if/when proper depth sorting is implemented.
 */
protected void renderLines(int start,int stop){
  report("String_Node_Str");
  gl.glPushMatrix();
  gl.glScalef(1,-1,1);
  gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
  for (int j=0; j < pathCount; j++) {
    int i=pathOffset[j];
    float sw=vertices[lines[i][VERTEX1]][SW];
    if (sw > 0) {
      gl.glLineWidth(sw);
      if (vertexBuffer.capacity() == pathLength[j] + 1) {
        expandBuffers();
      }
      vertexBuffer.rewind();
      colorBuffer.rewind();
      float a[]=vertices[lines[i][VERTEX1]];
      colorBuffer.put(toFixed32(a[SR]));
      colorBuffer.put(toFixed32(a[SG]));
      colorBuffer.put(toFixed32(a[SB]));
      colorBuffer.put(toFixed32(a[SA]));
      vertexBuffer.put(toFixed32(a[X]));
      vertexBuffer.put(toFixed32(a[Y]));
      vertexBuffer.put(toFixed32(a[Z]));
      for (int k=0; k < pathLength[j]; k++) {
        float b[]=vertices[lines[i][VERTEX2]];
        colorBuffer.put(toFixed32(b[SR]));
        colorBuffer.put(toFixed32(b[SG]));
        colorBuffer.put(toFixed32(b[SB]));
        colorBuffer.put(toFixed32(b[SA]));
        vertexBuffer.put(toFixed32(b[X]));
        vertexBuffer.put(toFixed32(b[Y]));
        vertexBuffer.put(toFixed32(b[Z]));
        i++;
      }
      vertexBuffer.position(0);
      colorBuffer.position(0);
      gl.glVertexPointer(3,GL10.GL_FIXED,0,vertexBuffer);
      gl.glColorPointer(4,GL10.GL_FIXED,0,colorBuffer);
      gl.glDrawArrays(GL10.GL_LINE_STRIP,0,pathLength[j] + 1);
    }
  }
  gl.glPopMatrix();
  report("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * In the current implementation, start and stop are ignored (in OpenGL). This will obviously have to be revisited if/when proper depth sorting is implemented.
 */
protected void renderLines(int start,int stop){
  report("String_Node_Str");
  gl.glPushMatrix();
  gl.glScalef(1,-1,1);
  gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
  gl.glEnableClientState(GL10.GL_COLOR_ARRAY);
  for (int j=0; j < pathCount; j++) {
    int i=pathOffset[j];
    float sw=vertices[lines[i][VERTEX1]][SW];
    if (sw > 0) {
      gl.glLineWidth(sw);
      if (vertexBuffer.capacity() / 3 <= 3 * (pathLength[j] + 1)) {
        expandBuffers();
      }
      vertexBuffer.rewind();
      colorBuffer.rewind();
      float a[]=vertices[lines[i][VERTEX1]];
      colorBuffer.put(toFixed32(a[SR]));
      colorBuffer.put(toFixed32(a[SG]));
      colorBuffer.put(toFixed32(a[SB]));
      colorBuffer.put(toFixed32(a[SA]));
      vertexBuffer.put(toFixed32(a[X]));
      vertexBuffer.put(toFixed32(a[Y]));
      vertexBuffer.put(toFixed32(a[Z]));
      for (int k=0; k < pathLength[j]; k++) {
        float b[]=vertices[lines[i][VERTEX2]];
        colorBuffer.put(toFixed32(b[SR]));
        colorBuffer.put(toFixed32(b[SG]));
        colorBuffer.put(toFixed32(b[SB]));
        colorBuffer.put(toFixed32(b[SA]));
        vertexBuffer.put(toFixed32(b[X]));
        vertexBuffer.put(toFixed32(b[Y]));
        vertexBuffer.put(toFixed32(b[Z]));
        i++;
      }
      vertexBuffer.position(0);
      colorBuffer.position(0);
      gl.glVertexPointer(3,GL10.GL_FIXED,0,vertexBuffer);
      gl.glColorPointer(4,GL10.GL_FIXED,0,colorBuffer);
      gl.glDrawArrays(GL10.GL_LINE_STRIP,0,pathLength[j] + 1);
    }
  }
  gl.glPopMatrix();
  report("String_Node_Str");
}