Compare, such that most severe Problems will appear last, least first.

@param o the o
@return the difference in severity as an integer
490756
@Override
	public int compareTo(final Problem o) {
		final int ix = this.severity.ordinal();
		final int oid = o.severity.ordinal();
		return ix - oid;
	}
170647
public int compareTo(UnicodeSet o, ComparisonStyle style) {
        if (style != ComparisonStyle.LEXICOGRAPHIC) {
            int diff = size() - o.size();
            if (diff != 0) {
                return (diff < 0) == (style == ComparisonStyle.SHORTER_FIRST) ? -1 : 1;
            }
        }
        int result;
        for (int i = 0; ; ++i) {
            if (0 != (result = list[i] - o.list[i])) {
                // if either list ran out, compare to the last string
                if (list[i] == HIGH) {
                    if (strings.isEmpty()) return 1;
                    String item = strings.first();
                    return compare(item, o.list[i]);
                }
                if (o.list[i] == HIGH) {
                    if (o.strings.isEmpty()) return -1;
                    String item = o.strings.first();
                    int compareResult = compare(item, list[i]);
                    return compareResult > 0 ? -1 : compareResult < 0 ? 1 : 0; // Reverse the order.
                }
                // otherwise return the result if even index, or the reversal if not
                return (i & 1) == 0 ? result : -result;
            }
            if (list[i] == HIGH) {
                break;
            }
        }
        return compare(strings, o.strings);
    }
1322692
@SuppressWarnings("unchecked")
   public static int compare(Object o1, Object o2) {
      if (o1 == null && o2 == null) {
         return 0;
      } else if (o1 == null) {
         return 1;
      } else if (o2 == null) {
         return -1;
      }
      return Cast.<Comparable>as(o1).compareTo(o2);
   }
34412
public int compareTo(Object o) {
        if (o.getClass() == MmsParameter.class) {
            return name.compareTo(((MmsParameter)o).getName());
        }
        return name.compareTo((String)o);
    }
991367
@Override
    public int compareTo(LocationWhereValueBecomesNull o) {
        int cmp = this.location.compareTo(o.location);
        if (cmp != 0) {
            return cmp;
        }
        cmp = this.valueNumber.compareTo(o.valueNumber);
        return cmp;
    }
985903
@Override
    public int compareTo(ComparableMethod o) {
        if (o instanceof XMethod) {
            return XFactory.compare((XMethod) this, (XMethod) o);
        }
        throw new ClassCastException("Don't know how to compare " + this.getClass().getName() + " to " + o.getClass().getName());
    }
1300822
@Override
  public int compareTo(ID o) {
    TaskAttemptID that = (TaskAttemptID)o;
    int tipComp = this.taskId.compareTo(that.taskId);
    if(tipComp == 0) {
      return this.id - that.id;
    }
    else return tipComp;
  }
1211700
@Override
    public int compare(Object o1, Object o2) {
        return (o1.hashCode() - o2.hashCode());
    }
1319725
@Override
  public int compareTo(ID o) {
    TaskID that = (TaskID)o;
    int jobComp = this.jobId.compareTo(that.jobId);
    if(jobComp == 0) {
      if(this.isMap == that.isMap) {
        return this.id - that.id;
      }
      else return this.isMap ? -1 : 1;
    }
    else return jobComp;
  }
93872
@Override
  public int compareTo(RepairDigramRecord o) {
    if (this.freq > o.freq) {
      return 1;
    }
    else if (this.freq < o.freq) {
      return -1;
    }
    return 0;
  }
479063
@Override
	public int compareTo(ValueArray<DoubleValue> o) {
		DoubleValueArray other = (DoubleValueArray) o;

		int min = Math.min(position, other.position);
		for (int i = 0; i < min; i++) {
			int cmp = Double.compare(data[i], other.data[i]);

			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(position, other.position);
	}
34681
public int compareTo(LogPosition o) {
        final int val = fileName.compareTo(o.fileName);

        if (val == 0) {
            return (int) (position - o.position);
        }
        return val;
    }
661315
public int compareTo(EntryPosition o) {
        final int val = journalName.compareTo(o.journalName);

        if (val == 0) {
            return (int) (position - o.position);
        }
        return val;
    }
289030
@Override
	public int compareTo(ValueArray<IntValue> o) {
		IntValueArray other = (IntValueArray) o;

		int min = Math.min(position, other.position);
		for (int i = 0; i < min; i++) {
			int cmp = Integer.compare(data[i], other.data[i]);

			if (cmp != 0) {
				return cmp;
			}
		}

		return Integer.compare(position, other.position);
	}
1326043
@Override
    public int compareTo(ADStarNodeImpl<A, S, C> o) {
        return this.key.compareTo(o.key);
    }
212762
@Override
	public int compareTo(CssLink o) {
		if (o == null) {
			return 1;
		}
		return Integer.valueOf(this.precedence).compareTo(o.precedence);
	}
887538
@Override
	public int compareTo(ValueArray<NullValue> o) {
		NullValueArray other = (NullValueArray) o;

		return Integer.compare(position, other.position);
	}