public Integer evaluate(ArrayList<String> needle, ArrayList<String> haystack) {
    if (needle == null) {
      return Integer.valueOf(-1);
    }
    if (haystack == null) {
      return null;
    }
    for (int ii = 0; ii < haystack.size() - needle.size() + 1; ++ii) {
      boolean found = true;
      for (int jj = 0; jj < needle.size(); ++jj) {
        if (haystack.get(ii + jj) == null ||
            needle.get(jj) == null ||
            !haystack.get(ii + jj).equals(needle.get(jj))) {
            found = false;
            break;
        }
      }
      if (found) {
        return Integer.valueOf(ii);
      }
    }
    return Integer.valueOf(-1);
  }