throw new IllegalStateException ("not all events flushed");
HashSet ungenerated = new HashSet(); ungenerated.addAll(m_events.getEvents()); ungenerated.removeAll(generated); StringBuffer msg = new StringBuffer(); msg.append("unable to generate all events"); for (Iterator it = ungenerated.iterator(); it.hasNext(); ) { Event ev = (Event) it.next(); msg.append("\n  " + ev + ": "); msg.append("\n    " + getOutgoing(ev)); msg.append("\n    " + getCauses(ev)); } throw new IllegalStateException(msg.toString());
    private void generate() {        HashSet generated = new HashSet();        int before;        do {            before = generated.size();            for (Iterator it = m_events.iterator(); it.hasNext(); ) {                Event ev = (Event) it.next();                if (generated.contains(ev)) { continue; }                if (getCount(ev) == 0) {                    generated.add(ev);                    clearArrows(ev);                    ev.dispatch(m_generator);                }            }        } while (generated.size() > before);        if (generated.size() < m_events.size()) {            throw new IllegalStateException                ("not all events flushed");        }    }