TripleAVLFile has the same bug as discussed by Joshua Bloch (
http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html). The middle calculation can overflow into negative if left + right is greater than MAX_INT. Probably not a big problem yet as all calls are 0, nrTriples where nrTriples is the block size which is less than MAX_INT.
Currently:
for (;;) {
// if the range is zero then the node was not found.
// return the next node up.
if (left >= right) {
return -right - 1;
}
// find the middle of this range
int middle = (left + right) / 2;
// determine if the required triple is above or below the middle
int c = comp.compare(triple, triples, middle);
// if it's in the middle then return it
if (c == 0) {
return middle;
}
if (c < 0) {
// if it's below the middle then search there
right = middle;
} else {
// if it's below the middle then search there
left = middle + 1;
}
Change:
int middle = (left + right) / 2;
To:
int middle = (left + right) >>> 1;
Also, the developers page (
http://mulgara.org/developers.html) points "please report it." to ihttp://... instead of http://.