I see a bug here as the nodeIds can be duplicates. Not your doing, but that should be fixed and then also extended with Long and (say String or some other type) node ids. That will make a better benchmark of the node renumbering logic.