@Override
public int compareTo(Profile o) {
int orderDiff = order - o.order;
if (orderDiff != 0) {
return orderDiff;
<BUG>}
if (this.equals(o)) {
return 0;
} else {
long timeDiff = creationTime - o.creationTime;
if (timeDiff != 0) {
return (int) timeDiff;
} else {
return hashCode() - o.hashCode();</BUG>
}

@Override
public int compareTo(Profile o) {
int orderDiff = order - o.order;
if (orderDiff != 0) {
return orderDiff;
} else {
return id - o.id;
