code: protected Set<String> updateInBuffer(final NodeData node, final QPath prevPath, Set<String> idsToSkip)
     {
        // I expect that NullNodeData will never update existing NodeData.
        CacheQPath prevKey = new CacheQPath(getOwnerId(), node.getParentIdentifier(), prevPath, ItemType.NODE);
        if (node.getIdentifier().equals(cache.getFromBuffer(prevKey)))
        {
           cache.remove(prevKey);
        }
  
        // update childs paths if index changed
        int nodeIndex = node.getQPath().getEntries()[node.getQPath().getEntries().length - 1].getIndex();
        int prevNodeIndex = prevPath.getEntries()[prevPath.getEntries().length - 1].getIndex();
        if (nodeIndex != prevNodeIndex)
        {
           // its a same name reordering
           return updateTreePath(prevPath, node.getQPath(), idsToSkip);
        }
        return null;
     }
docs: Update Node hierarchy in case of same-name siblings reorder.
  Assumes the new (updated) nodes already put in the cache. Previous name of updated nodes will be calculated
  and that node will be deleted (if has same id as the new node). Children paths will be updated to a new node path.
  
  @param node new node data
  @param prevPath old path
  @param idsToSkip set of ids to skip, this is needed to avoid modifying the path twice in case of an OrderBefore
  @return the ids to skip for the next operation