code: @Override
      public int stage3EquivalenceParameters(ProtoNetwork network,
              Set<EquivalenceDataIndex> indexes) throws IOException {
          if (indexes == null) {
              throw new InvalidArgument("indexes", indexes);
          }
  
          // FIXME Better way to subset equivalences, like maybe by domain
          Set<String> pnNsLocations = new HashSet<String>();
          for (TableNamespace tn : network.getNamespaceTable().getNamespaces()) {
              pnNsLocations.add(tn.getResourceLocation());
          }
  
          Iterator<EquivalenceDataIndex> indexIt = indexes.iterator();
          while (indexIt.hasNext()) {
              EquivalenceDataIndex index = indexIt.next();
  
              // if proto network does not contain this index, throw it away
              if (!pnNsLocations.contains(index.getNamespaceResourceLocation())) {
                  indexIt.remove();
              }
          }
  
          if (!indexes.isEmpty()) {
              equivs = new EquivalenceResourceImpl(indexes);
              equivs.openResources();
              BucketEquivalencer be = new BucketEquivalencer(network, equivs);
              return be.equivalence();
          }
  
          return 0;
      }
docs: {@inheritDoc}