Adds all the elements from <code>s2</code> to
<code>s1</code>.
170712
public boolean join(Set<T> s1, Set<T> s2) {
	return s1.addAll(s2);
    }
1207362
final Selector append(Selector s) {
		if (this.next == null) {
			return this.copy(s);
		} else {
			return this.copy(this.next.append(s));
		}
	}
459062
protected boolean addElem(final T element) {
    // validate element
    if (element == null) {
      throw new IllegalArgumentException("Null element is not supported.");
    }
    // find hashCode & index
    final int hashCode = element.hashCode();
    final int index = getIndex(hashCode);
    // return false if already present
    if (containsElem(index, element, hashCode)) {
      return false;
    }

    modification++;
    size++;

    // update bucket linked list
    DoubleLinkedElement<T> le = new DoubleLinkedElement<T>(element, hashCode);
    le.next = entries[index];
    entries[index] = le;

    // insert to the end of the all-element linked list
    le.after = null;
    le.before = tail;
    if (tail != null) {
      tail.after = le;
    }
    tail = le;
    if (head == null) {
      head = le;
    }
    return true;
  }
939766
@SafeVarargs
  /* #end */
  public final void addFirst(KType... elements) {
    ensureBufferSpace(elements.length);
    for (KType k : elements) {
      addFirst(k);
    }
  }
1347277
public static <E> Set<E> diff(Set<E> s1, Set<E> s2) {
    Set<E> s = new HashSet<E>();
    for (E o : s1) {
      if (!s2.contains(o)) {
        s.add(o);
      }
    }
    return s;
  }
205963
private void put122(final int b, final int s1, final int s2) {
        pool.putBS(b, s1).putShort(s2);
    }
745296
public static Object addAll(final Object array1, final Object array2) {
        Object joinedArray;
        if (array1 == null) {
            if (array2.getClass().isArray()) {
                joinedArray = array2;
            } else {
                joinedArray = Array.newInstance(array2.getClass(), 1);
                Array.set(joinedArray, 0, array2);
            }
        } else if (array2 == null) {
            if (array1.getClass().isArray()) {
                joinedArray = array1;
            } else {
                joinedArray = Array.newInstance(array1.getClass(), 1);
                Array.set(joinedArray, 0, array1);
            }
        } else {
            int length1 = 1;
            if (array1.getClass().isArray()) {
                length1 = Array.getLength(array1);
            }
            int length2 = 1;
            if (array2.getClass().isArray()) {
                length2 = Array.getLength(array2);
            }
            if (array1.getClass().isArray()) {
                joinedArray = Array.newInstance(array1.getClass().getComponentType(), length1 + length2);
            } else {
                joinedArray = Array.newInstance(array1.getClass(), length1 + length2);
            }
            if (array1.getClass().isArray()) {
                System.arraycopy(array1, 0, joinedArray, 0, length1);
            } else {
                Array.set(joinedArray, 0, array1);
            }
            if (array2.getClass().isArray()) {
                System.arraycopy(array2, 0, joinedArray, length1, length2);
            } else {
                Array.set(joinedArray, length1, array2);
            }
        }
        return joinedArray;
    }
1339910
public static Pair<String,String> pair (final String s1, final String s2)
        {        
        if (StringUtils.isBlank(s1))
            {
            LOG.warn("Blank first arg");
            }
        if (StringUtils.isBlank(s2))
            {
            LOG.warn("Blank second arg for: "+s1);
            }
        return new PairImpl<String,String> (s1, s2);
        }
281746
public static <K, V> void putAll(Map<K, V> to, Map<? extends K, ? extends V> from) {
        if (to != null && from != null) {
            to.putAll(from);
        }
    }
1364881
public final <T1, T2> Tuple2<T1, T2> concat(Tuple2<T1, T2> tuple) {
        return new Tuple2<>(tuple.v1, tuple.v2);
    }
526522
public void add(Iterable<XElement> elements) {
        for (XElement e : elements) {
            e.parent = this;
            children.add(e);
        }
    }
15175
public ListBuilder<T> addAll( Iterable<T> elements)
    {
    for( T element : elements)
      {
      list_.add( element);
      }
    
    return this;
    }
1300828
@SafeVarargs
    public final void addAll(E... elements) {
        if (elements == null) throw new NullPointerException();
        addAll(Arrays.asList(elements));
    }
741440
@Override
	public boolean addAll(final int index, final Collection<? extends V> c) {
		return this.list.addAll(index, c);
	}
1171722
public static IntPoint Add(IntPoint point1, IntPoint point2) {
        IntPoint result = new IntPoint(point1);
        result.Add(point2);
        return result;
    }
1137498
def merge(self, elements):
		'''  '''

		from collections import Counter
		from lltk.utils import list2tuple, tuple2list
		# The list2tuple conversion is necessary because mutable objects (e.g. lists) are not hashable
		merged = tuple2list([value for value, count in Counter(list2tuple(list(elements))).most_common()])
		return merged
744889
@Override
	public boolean addAll(Collection<? extends T> newElements) {
		for (T newElement : newElements) {
			add(newElement);
		}
		return true;
	}