code: public void calculateDependents() {
          dependents = new HashMap<String,Set<String>>();
          for (String s : packages.keySet()) {
              Package p = packages.get(s);
              for (String d : p.dependencies()) {
                  Set<String> ss = dependents.get(d);
                  if (ss == null) {
                      ss = new HashSet<String>();
                      dependents.put(d, ss);
                  }
                  // Add the dependent information to the global dependent map.
                  ss.add(s);
                  Package dp = packages.get(d);
                  // Also add the dependent information to the package specific map.
                  // Normally, you do not compile java.lang et al. Therefore
                  // there are several packages that p depends upon that you
                  // do not have in your state database. This is perfectly fine.
                  if (dp != null) {
                      // But this package did exist in the state database.
                      dp.addDependent(p.name());
                  }
              }
          }
      }
docs: Calculate the package dependents (ie the reverse of the dependencies).