public Integer evaluate2(ArrayList<String> arr1, ArrayList<String> arr2) {
      // Be greedy, but not too greedy...limit map to 100M buckets but try for
      // 1000 buckets per potentially-used item. Should keep us under our
      // allotted default -Xmx512MB.
      Integer capacity = arr1.size() > 10485 ? 104857600 : arr1.size()*1000;
      HashMap<String, Integer> m = new HashMap<String, Integer>(capacity, (float) 1.0);
      
      Integer result = 0;
      for (String key : arr1) {
        if (key != null) {
          m.put(key, m.containsKey(key) ? m.get(key) + 1 : 1);
        }
      }

      Integer val;
      for (String key : arr2) {
        if (key != null) {
          if (m.containsKey(key) && (val = m.get(key)) > 0) {
            result++;
            m.put(key, val - 1);
          }
        }
      }
      return result;
    }