public int advance(int target) {upto++;if (upto == docIDs.length) {return docID = NO_MORE_DOCS;}int inc = 10;int nextUpto = upto+10;int low;int high;while (true) {if (nextUpto >= docIDs.length) {low = nextUpto-inc;high = docIDs.length-1;break;}if (target <= docIDs[nextUpto]) {low = nextUpto-inc;high = nextUpto;break;}inc *= 2;nextUpto += inc;}while (true) {if (low > high) {upto = low;break;}int mid = (low + high) >>> 1;int cmp = docIDs[mid] - target;if (cmp < 0) {low = mid + 1;} else if (cmp > 0) {high = mid - 1;} else {upto = mid;break;}}if (upto == docIDs.length) {return docID = NO_MORE_DOCS;} else {return docID = docIDs[upto];}}
public override int Advance(int target){upto++;if (upto == docIDs.Length){return docID_Renamed = NO_MORE_DOCS;}int inc = 10;int nextUpto = upto + 10;int low;int high;while (true){if (nextUpto >= docIDs.Length){low = nextUpto - inc;high = docIDs.Length - 1;break;}if (target <= docIDs[nextUpto]){low = nextUpto - inc;high = nextUpto;break;}inc *= 2;nextUpto += inc;}while (true){if (low > high){upto = low;break;}int mid = (int) ((uint) (low + high) >> 1);int cmp = docIDs[mid] - target;if (cmp < 0){low = mid + 1;}else if (cmp > 0){high = mid - 1;}else{upto = mid;break;}}if (liveDocs != null){while (upto < docIDs.Length){if (liveDocs.Get(docIDs[upto])){break;}upto++;}}if (upto == docIDs.Length){return docID_Renamed = NO_MORE_DOCS;}else{return docID_Renamed = docIDs[upto];}}