public void print(final PrintWriter out, boolean printLeaves) {

		final Iterator callers = calls.keySet().iterator();
		while (callers.hasNext()) {
			final MemberRef caller = (MemberRef) callers.next();

			final Iterator callees = ((Set) calls.get(caller)).iterator();

			if (!printLeaves && !callees.hasNext()) {
				continue;
			}

			out.print(caller.declaringClass() + "." + caller.name()
					+ caller.type());
			if (roots.contains(caller)) {
				out.print(" (root)");
			}
			out.println("");

			while (callees.hasNext()) {
				final MemberRef callee = (MemberRef) callees.next();

				// Only print live methods
				if (!calls.containsKey(callee)) {
					continue;
				}

				out.println("  " + callee.declaringClass() + "."
						+ callee.name() + callee.type());
			}

			out.println("");
		}
	}