Source:
<code>public ImmutableBitmap getBitmapIndex(final BitmapIndexSelector selector) { final Context cx = Context.enter(); try { ImmutableBitmap bitmap; boolean hasEmptyDimension = false; Indexed<String> dimValuesList = new Indexed[dimension.length]; Iterator<String> dimValuesIterator = new Iterator[dimension.length]; String[] currentDim = new String[dimension.length]; for(int idx = 0; idx < dimension.length; idx++) { dimValuesList[idx] = selector.getDimensionValues(dimension[idx]); if (dimValuesList[idx].size() == 0) { hasEmptyDimension = true; break; } dimValuesIterator[idx] = dimValuesList[idx].iterator(); if (idx != 0) { currentDim[idx] = dimValuesIterator[idx].next(); } } bitmap = selector.getBitmapFactory().makeEmptyImmutableBitmap(); if (!hasEmptyDimension) { int iteratingIndex = 0; while(true) { Iterator<String> iterator = dimValuesIterator[iteratingIndex]; if (iterator.hasNext()) { currentDim[iteratingIndex] = iterator.next(); <START> if (predicate.applyInContext(cx, currentDim)) <END> { ImmutableBitmap overlap = null; for (int idx = 0; idx < dimension.length; idx++) { ImmutableBitmap dimBitMap = selector.getBitmapIndex(dimension[idx], currentDim[idx]); overlap = (overlap == null) ? dimBitMap : overlap.intersection(dimBitMap); } bitmap = bitmap.union(overlap); } if (iteratingIndex > 0) { for (int idx = 0; idx < iteratingIndex; idx++) { dimValuesIterator[idx] = dimValuesList[idx].iterator(); } iteratingIndex = 0; } } else { iteratingIndex++; if (iteratingIndex == dimension.length) break; } } } return bitmap; } finally { Context.exit(); } }</code><technical_language>this called iteratingIndex == 0</technical_language>

Target:
public ImmutableBitmap getBitmapIndex(final BitmapIndexSelector selector) { final Context cx = Context.enter(); try { ImmutableBitmap bitmap; boolean hasEmptyDimension = false; Indexed<String> dimValuesList = new Indexed[dimension.length]; Iterator<String> dimValuesIterator = new Iterator[dimension.length]; String[] currentDim = new String[dimension.length]; for(int idx = 0; idx < dimension.length; idx++) { dimValuesList[idx] = selector.getDimensionValues(dimension[idx]); if (dimValuesList[idx].size() == 0) { hasEmptyDimension = true; break; } dimValuesIterator[idx] = dimValuesList[idx].iterator(); if (idx != 0) { currentDim[idx] = dimValuesIterator[idx].next(); } } bitmap = selector.getBitmapFactory().makeEmptyImmutableBitmap(); if (!hasEmptyDimension) { int iteratingIndex = 0; while(true) { Iterator<String> iterator = dimValuesIterator[iteratingIndex]; if (iterator.hasNext()) { currentDim[iteratingIndex] = iterator.next(); if (iteratingIndex > 0) { for (int idx = 0; idx < iteratingIndex; idx++) { dimValuesIterator[idx] = dimValuesList[idx].iterator(); currentDim[idx] = dimValuesIterator[idx].next(); } iteratingIndex = 0; } if (predicate.applyInContext(cx, currentDim)) { ImmutableBitmap overlap = null; for (int idx = 0; idx < dimension.length; idx++) { ImmutableBitmap dimBitMap = selector.getBitmapIndex(dimension[idx], currentDim[idx]); overlap = (overlap == null) ? dimBitMap : overlap.intersection(dimBitMap); } bitmap = bitmap.union(overlap); } } else { iteratingIndex++; if (iteratingIndex == dimension.length) break; } } } return bitmap; } finally { Context.exit(); } }