accord-core/src/main/java/accord/utils/btree/BTree.java [1164:1195]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            } while (null == out && ++i < sz);
        }
        // out == null -> i == sz
        // otherwise      out == apply.apply(leaf[i])

        if (i == sz)
        {
            // if we have reached the end of the input, we're either:
            //   1) returning input unmodified; or
            //   2) copying some (possibly empty) prefix of it

            if (identicalUntil == sz)
                return leaf;

            if (identicalUntil == 0)
                return empty();

            Object[] copy = new Object[identicalUntil | 1];
            System.arraycopy(leaf, 0, copy, 0, identicalUntil);
            return copy;
        }

        try (FastBuilder<O> builder = fastBuilder())
        {
            // otherwise copy the initial part that was unmodified, insert the non-null modified key, and continue
            if (identicalUntil > 0)
                builder.leaf().copyNoOverflow(leaf, 0, identicalUntil);
            builder.leaf().addKeyNoOverflow(out);

            while (++i < sz)
            {
                in = (I) leaf[i];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



accord-core/src/main/java/accord/utils/btree/BTree.java [1275:1306]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            } while (null == out && ++i < sz);
        }
        // out == null -> i == sz
        // otherwise      out == apply.apply(leaf[i])

        if (i == sz)
        {
            // if we have reached the end of the input, we're either:
            //   1) returning input unmodified; or
            //   2) copying some (possibly empty) prefix of it

            if (identicalUntil == sz)
                return leaf;

            if (identicalUntil == 0)
                return empty();

            Object[] copy = new Object[identicalUntil | 1];
            System.arraycopy(leaf, 0, copy, 0, identicalUntil);
            return copy;
        }

        try (FastBuilder<O> builder = fastBuilder())
        {
            // otherwise copy the initial part that was unmodified, insert the non-null modified key, and continue
            if (identicalUntil > 0)
                builder.leaf().copyNoOverflow(leaf, 0, identicalUntil);
            builder.leaf().addKeyNoOverflow(out);

            while (++i < sz)
            {
                in = (I) leaf[i];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



