code: private static Pair<Map<Integer, TermParameter>, Map<Integer, TermParameter>> inferOrthologs(
              Kam kam, KAMStore kAMStore, SpeciesDialect dialect,
              EdgeFilter inferf, Set<KamNode> species,
              Map<KamNode, KamNode> ortho) {
  
          final List<org.openbel.framework.common.model.Namespace> spl = dialect
                  .getSpeciesNamespaces();
          final Set<String> rlocs = constrainedHashSet(spl.size());
          for (final org.openbel.framework.common.model.Namespace n : spl) {
              rlocs.add(n.getResourceLocation());
          }
  
          Map<Integer, TermParameter> ntp = sizedHashMap(species.size());
          Map<Integer, TermParameter> etp = sizedHashMap(species.size());
          for (final KamNode snode : species) {
              if (snode != null) {
                  // XXX term parameter looked up 2x; may impact perf/determinism
                  // TODO redesign orthologousNodes / inferOrthologs
                  TermParameter p = findParameter(kam, kAMStore, snode, rlocs);
  
                  // recurse incoming connections from species node
                  recurseConnections(kam, snode, p, inferf, REVERSE, ortho, ntp, etp);
                  // recurse outgoing connections from species node
                  recurseConnections(kam, snode, p, inferf, FORWARD, ortho, ntp, etp);
              }
          }
  
          return new Pair<Map<Integer, TermParameter>, Map<Integer, TermParameter>>(
                  ntp, etp);
      }
docs: Infers orthologous {@link KamEdge edges} downstream and upstream from
  all {@link KamNode species replacement nodes}.
  
  @param kam {@link Kam}
  @param inferf {@link EdgeFilter}
  @param species {@link Set} of {@link Integer} species replacement node
  ids