code: public static <V> void addOutgoingEdges(DirectedGraph<V, DefaultEdge> graph, V source, Set<V> targets) {
          if (!graph.containsVertex(source)) {
              graph.addVertex(source);
          }
          for (V target : targets) {
              if (!graph.containsVertex(target)) {
                  graph.addVertex(target);
              }
              graph.addEdge(source, target);
          }
      }
docs: Add dependencies to the given source vertex. Whether duplicates are created is dependent
  on the underlying {@link DirectedGraph} implementation.
  @param graph graph to be mutated
  @param source source vertex of the new edges
  @param targets target vertices for the new edges