BugInstance lhs = (BugInstance) a; BugInstance rhs = (BugInstance) b;   String lhsString = lhs.toString(); String rhsString = rhs.toString(); int cmp = lhsString.substring(0, lhsString.indexOf(':')).compareTo(rhsString.substring(0, rhsString.indexOf(':'))); if (cmp != 0) return cmp; return lhs.compareTo(rhs); }
int cmp = bugInstanceTypeComparator.compare(a, b); if (cmp != 0) return cmp; return ((Comparable)a).compareTo(b); }
        public int compare(Object a, Object b) {            BugInstance lhs = (BugInstance) a;            BugInstance rhs = (BugInstance) b;            // FIXME: we're just sorting them by type, sort of.            // Need to do something more intelligent here.            String lhsString = lhs.toString();            String rhsString = rhs.toString();            int cmp = lhsString.substring(0, lhsString.indexOf(':')).compareTo(rhsString.substring(0, rhsString.indexOf(':')));            if (cmp != 0)                return cmp;            return lhs.compareTo(rhs);        }