code: public Optional<ReplaceInList> repairLocalCommand(final ReplaceInList toRepair, final ReplaceInList repairAgainst) {
          if (toRepair.getPosition() == repairAgainst.getPosition()) {
              return Optional.empty();
          }
          return Optional.of(toRepair);
      }
docs: Repairs a local {@link ReplaceInList} in relation to a remote {@link ReplaceInList} command.
  
  @param toRepair
  The local command to repair.
  @param repairAgainst
  The remote command to repair against.
  @return The repaired command or an empty optional if repairing results in droping the command.