BugInstance lhs = (BugInstance) a; BugInstance rhs = (BugInstance) b; int cmp = lhs.getPrimaryClass().getPackageName().compareTo(rhs.getPrimaryClass().getPackageName()); if (cmp != 0) return cmp; return lhs.compareTo(rhs); }
int cmp = bugInstancePackageComparator.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;            int cmp = lhs.getPrimaryClass().getPackageName().compareTo(rhs.getPrimaryClass().getPackageName());            if (cmp != 0)                return cmp;            return lhs.compareTo(rhs);        }