added = new Condition(query, one.getHead(),
added = new Condition(table.getNode(), one.getHead(),
    public void act(Table table) {        Query query = table.getQuery();        if (table.getSelections().size() == 0) {            if (table.isEliminable()) {                table.remove();                query.modify("Removed '" + table + "'.");            } else if (table.getConditions().size() == 2 &&                       !table.isBase()) {                Iterator it = table.getConditions().iterator();                Condition one = (Condition) it.next();                Condition two = (Condition) it.next();                Condition added = null;                if (one.getHead().getTable().equals(table) &&                    two.getHead().getTable().equals(table) &&                    one.getHead().equals(two.getHead())) {                    if (!one.isOuter() && !two.isOuter()) {                        added = new Condition(query, one.getTail(),                                              two.getTail());                    }                } else if (one.getTail().getTable().equals(table) &&                           two.getTail().getTable().equals(table) &&                           one.getTail().equals(two.getTail())) {                    if (!one.isOuter() && !two.isOuter()) {                        added = new Condition(query, one.getHead(),                                              two.getHead());                    }                } else if (one.getHead().getTable().equals(table) &&                           one.getHead().equals(two.getTail())){                    added = new Condition(query, one.getTail(),                                          two.getHead());                } else if (one.getTail().equals(two.getHead())) {                    added = new Condition(query, two.getTail(),                                          one.getHead());                }                if (added != null) {                    table.remove();                    query.modify(                        "Added join from '" + added.getTail() + "' to '" +                        added.getHead() + "' and removed '" + table + "'."                        );                }            }        } else if (canShiftSelections(table)) {            Table other = shiftSelections(table);            Assert.assertEquals(0, table.getSelections().size());            table.remove();            query.modify(                "Shifted selections from '" + table + "' to '" + other +                "' and removed '" + table + "'."                );        }    }