private static void tabulateTransitiveDependentClasses(
    RefClass refClass, Set<? super RefClass> newDependents) {
    final LinkedList<RefClass> pendingClasses = new LinkedList<>();
    pendingClasses.addLast(refClass);
    final Set<RefClass> processedClasses = new HashSet<>();
    while (!pendingClasses.isEmpty()) {
      final RefClass classToProcess = pendingClasses.removeFirst();
      newDependents.add(classToProcess);
      processedClasses.add(classToProcess);
      final Set<RefClass> dependents =
        calculateDependentsForClass(classToProcess);
      for (RefClass dependent : dependents) {
        if (!pendingClasses.contains(dependent) &&
            !processedClasses.contains(dependent)) {
          pendingClasses.addLast(dependent);
        }
      }
    }
    newDependents.remove(refClass);
  }
private static void tabulateTransitiveDependentClasses(
    RefClass refClass, Set<? super RefClass> newDependents)