javagit/src/main/java/edu/nyu/cs/javagit/utilities/CheckUtilities.java
public static boolean checkUnorderedListsEqual(List<?> l1, List<?> l2) {
    if (null == l1 && null != l2) {
      return false;
    }

    if (null != l1 && null == l2) {
      return false;
    }

    if (l1.size() != l2.size()) {
      return false;
    }

    for (Object o : l1) {
      if (!l2.contains(o)) {
        return false;
      }
    }

    for (Object o : l2) {
      if (!l1.contains(o)) {
        return false;
      }
    }

    return true;
  }
public static boolean checkUnorderedListsEqual(List<?> l1, List<?> l2) {
    if (null == l1 && null != l2) {
      return false;
    }

    if (null != l1 && null == l2) {
      return false;
    }

    if (l1.size() != l2.size()) {
      return false;
    }

    for (Object o : l1) {
      if (!l2.contains(o)) {
        return false;
      }
    }

    for (Object o : l2) {
      if (!l1.contains(o)) {
        return false;
      }
    }

    return true;
  }
Checks if two unordered lists are equal.

@param l1
The first list to test.
@param l2
The second list to test.
@return True if:
<ul>
<li>both lists are null or</li>
<li>both lists are the same length, there exists an equivalent object in l2 for all
objects in l1, and there exists an equivalent object in l1 for all objects in l2</li>
</ul>
False otherwise.