code: public void collect(Name currPkg, Name depPkg) {
          if (!currPkg.equals(depPkg)) {
              Set<Name> theset = deps.get(currPkg);
              if (theset==null) {
                  theset = new HashSet<Name>();
                  deps.put(currPkg, theset);
              }
              theset.add(depPkg);
          }
      }
docs: Collect a dependency. curr_pkg is marked as depending on dep_pkg.