presto-main/src/main/java/io/prestosql/operator/PagesIndex.java/PagesIndex/swap
class PagesIndex:    @Override
    public void swap(int a, int b)
    {
        long[] elements = valueAddresses.elements();
        long temp = elements[a];
        elements[a] = elements[b];
        elements[b] = temp;
    }