Compares two lists of QNames for equality.

@param list1
@param list2
@return true iff each list contains the same QName values in the same order
500563
public static boolean compareQNameLists(List<QName> list1, List<QName> list2) {
        if (list1 == list2)
            return true;
        if (list1 == null || list2 == null)
            return false;
        if (list1.size() != list2.size())
            return false;

        for (int i = 0; i < list1.size(); i++) {
            if (!compareQNames(list1.get(i), list2.get(i)))
                return false;
        }

        return true;
    }
1269747
public static double computeCorrelation(List<Double> list1, List<Double> list2) {
        double[] l1 = new double[list1.size()];
        double[] l2 = new double[list2.size()];

        for (int i=0; i<list1.size(); i++) {
            l1[i] = list1.get(i);
        }
        for (int i=0; i<list2.size(); i++) {
            l2[i] = list2.get(i);
        }

        SpearmansCorrelation sc = new SpearmansCorrelation();
        return sc.correlation(l1,  l2);
    }
251055
public static boolean equal(String str1, String str2) {
		return str1 != null && str2 != null && str1.equals(str2);
	}
523673
public static boolean notEquals(final Object object1, final Object object2) {
        return object1 != null && !object1.equals(object2) || object1 == null && object2 != null;
    }
680016
public static <T> List<T> mergeLists(List<T> list1, List<T> list2) {
        List<T> merged = new LinkedList<T>();
        if (list1 != null) {
            merged.addAll(list1);
        }
        if (list2 != null) {
            merged.addAll(list2);
        }
        return merged;
    }
1065308
def equal(list1, list2):
    
    return [item1 == item2 for item1, item2 in broadcast_zip(list1, list2)]
464345
protected boolean collectionsEqual(Collection a1, Collection a2) {
		if (a1 != null && a2 != null && a1.size() == a2.size()) {
			// Loop over each element and compare them using our comparator
			Iterator iterA1 = a1.iterator();
			Iterator iterA2 = a2.iterator();
			while (iterA1.hasNext()) {
				if (!equalByComparator(iterA1.next(), iterA2.next())) {
					return false;
				}
			}
		}
		else if (a1 == null && a2 == null) {
			return true;
		}
		return false;
	}
439348
public boolean compare(List<CoreLabel> doc1, List<CoreLabel> doc2) {
		int i1 = 0, i2 = 0; //
		String last1 = "O", last2 = "O";

		boolean cm_set;
	
		for (int i = 0; i < doc1.size(); i++) {
			CoreLabel c1 = doc1.get(i);
			CoreLabel c2 = doc2.get(i);
			
			String a1 = c1.getString(AnswerAnnotation.class);
			String a2 = c2.getString(AnswerAnnotation.class);
			
			if (a1 == null || a2 == null) return false;
		}
		// TODO
			
		return true;
	}
453825
protected static boolean elementsEquals(Object e1, Object e2) {
		return (e1 == null && e2 == null) || e1.equals(e2);
	}
268196
private boolean isEqual(String str1, String str2) {
		if (StringUtils.isEmpty(str1) && StringUtils.isEmpty(str2)) {
			return true;
		} else if (!StringUtils.isEmpty(str1)) {
			return str1.equals(str2);
		} else {
			return false;
		}
	}
793459
def isetdiff_flags(list1, list2):
    
    set2 = set(list2)
    return (item not in set2 for item in list1)
1024240
public boolean areEquals(String str1, String str2) {

		return (str1 == null && str2 == null || str1 != null && str2 != null && str1.equals(str2));
	}
1134020
def lsummult (list1,list2):
    
    if len(list1) != len(list2):
        raise ValueError("Lists not equal length in summult.")
    s = 0
    for item1,item2 in pstat.abut(list1,list2):
        s = s + item1*item2
    return s
313569
public static boolean arrayEquals(List<String> a, List<String> b) {
        if (a == null) {
            a = new ArrayList<>();
        }
        if (b == null) {
            b = new ArrayList<>();
        }
        if (a.size() != b.size()) {
            return false;
        }

        for (int i = 0; i < a.size(); i ++) {
            if (!a.get(i).equals(b.get(i))) {
                return false;
            }
        }
        return true;
    }
318430
public static double computeCorrelation(final List<Double> list1, final List<Double> list2)
    {
        final SpearmansRankCorrelation_old src = new SpearmansRankCorrelation_old();
        for (int i = 0; i < list1.size(); i++) {
            src.addXValue(Integer.toString(i), list1.get(i));
            src.addYValue(Integer.toString(i), list2.get(i));
            i++;
        }
        return src.calculate();
    }
1099590
public static <S> boolean solutionListsAreEquals(List<S> solutionList,
                                                   List<S> newSolutionList) {
    boolean found;
    for (int i = 0; i < solutionList.size(); i++) {

      int j = 0;
      found = false;
      while (j < newSolutionList.size()) {
        if (solutionList.get(i).equals(newSolutionList.get(j))) {
          found = true;
        }
        j++;
      }
      if (!found) {
        return false;
      }
    }
    return true;
  }
326475
protected Boolean compareList( // was BooleanValue
      ArrayList firstList,
      Object val1,
      boolean lessThan,
      boolean permissive,
      boolean overallTrue) // If true we are searching for at least one TRUE result, else at least one FALSE.
    {
      if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.entry(cclass, 
                 "compareList", 
                 new Object[] { firstList, 
                                val1, 
                                new Boolean(lessThan), 
                                new Boolean(permissive), 
                                new Boolean(overallTrue) });

      Boolean finalReturn = null;

      if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.exit(cclass, "compareList", finalReturn);       
      return finalReturn;
    }