code: public void repairLocalCommandsVersion(final Queue<ListCommand> localCommands,
              final ListCommand originalRemoteCommand) {
  
          localCommands.add(repairCommand(localCommands.poll(), originalRemoteCommand.getListVersionChange()
                  .getToVersion(), randomUUID()));
  
          final int count = localCommands.size();
          for (int i = 1; i < count; i++) {
              localCommands.add(repairCommand(localCommands.poll(), randomUUID(), randomUUID()));
          }
      }
docs: Updates the versions of repaired local commands that should be resent to the server so that they are based on the
  version the original remote command produced.
  
  @param localCommands
  The local commands that should be repaired. <b>WARNING:</b> The repaired commands are added directly
  to the queue again.
  @param originalRemoteCommand
  The remote command that contains the last known version of the list the server has.