LinkedList<CachedBlock> blocks = new LinkedList<CachedBlock>();
<BUG>while(!queue.isEmpty()) {
</BUG>
blocks.addFirst(queue.poll());
}
<BUG>return blocks.toArray(new CachedBlock[blocks.size()]);
}</BUG>
public long heapSize() {
return heapSize;
}

LinkedList<CachedBlock> blocks = new LinkedList<CachedBlock>();
while (!queue.isEmpty()) {
blocks.addFirst(queue.poll());
}
return blocks;
}
public long heapSize() {
return heapSize;
