code: static final void replacePassFactory(
        List<PassFactory> factoryList, PassFactory factory) {
      factoryList.set(
          findPassIndexByName(factoryList, factory.getName()), factory);
    }
docs: Find a pass factory with the same name as the given one, and replace it.