bypasses duplicate for efficiency
763222
@Override
	public BitVector range(int from, int to) {
		if (from < 0) throw new IllegalArgumentException();
		if (to < from) throw new IllegalArgumentException();
		from += start;
		to += start;
		if (to > finish) throw new IllegalArgumentException();
		return new BitVector(from, to, bits, mutable);
	}
231615
@Override
    public Collection duplicate(boolean deepCopy) {
	new ArrayImpl().duplicate(deepCopy);
	return new ListAsArray((List) Duplicator.duplicate(list, deepCopy));
    }
128688
def remove_duplicates(seq):
    '''
    
    '''
    last_boundary = False
    for char in seq:
        if char == '\x00':
            if not last_boundary:
                last_boundary = True
                yield char
        else:
            last_boundary = False
            yield char
946643
def skip(self, num_bytes):
        """"""
        if num_bytes is None:
            self._offset = len(self._data)
        else:
            self._offset += num_bytes
1329809
def links_duplicate_on(attribute, separator)
      links.map do  |link|
        link.send(attribute).split(separator).collect do |value|
          link.dup.update(Hash[attribute, value])
        end
      end.flatten
    end
12217
def AppendUnique(self, delete_existing=0, **kw):
        
        kw = copy_non_reserved_keywords(kw)
        for key, val in kw.items():
            if SCons.Util.is_List(val):
                val = _delete_duplicates(val, delete_existing)
            if key not in self._dict or self._dict[key] in ('', None):
                self._dict[key] = val
            elif SCons.Util.is_Dict(self._dict[key]) and \
                 SCons.Util.is_Dict(val):
                self._dict[key].update(val)
            elif SCons.Util.is_List(val):
                dk = self._dict[key]
                if key == 'CPPDEFINES':
                    tmp = []
                    for i in val:
                        if SCons.Util.is_List(i):
                            if len(i) >= 2:
                                tmp.append((i[0], i[1]))
                            else:
                                tmp.append((i[0],))
                        elif SCons.Util.is_Tuple(i):
                            tmp.append(i)
                        else:
                            tmp.append((i,))
                    val = tmp
                    # Construct a list of (key, value) tuples.
                    if SCons.Util.is_Dict(dk):
                        tmp = []
                        for (k, v) in dk.items():
                            if v is not None:
                                tmp.append((k, v))
                            else:
                                tmp.append((k,))
                        dk = tmp
                    elif SCons.Util.is_String(dk):
                        dk = [(dk,)]
                    else:
                        tmp = []
                        for i in dk:
                            if SCons.Util.is_List(i):
                                if len(i) >= 2:
                                    tmp.append((i[0], i[1]))
                                else:
                                    tmp.append((i[0],))
                            elif SCons.Util.is_Tuple(i):
                                tmp.append(i)
                            else:
                                tmp.append((i,))
                        dk = tmp
                else:
                    if not SCons.Util.is_List(dk):
                        dk = [dk]
                if delete_existing:
                    dk = [x for x in dk if x not in val]
                else:
                    val = [x for x in val if x not in dk]
                self._dict[key] = dk + val
            else:
                dk = self._dict[key]
                if SCons.Util.is_List(dk):
                    if key == 'CPPDEFINES':
                        tmp = []
                        for i in dk:
                            if SCons.Util.is_List(i):
                                if len(i) >= 2:
                                    tmp.append((i[0], i[1]))
                                else:
                                    tmp.append((i[0],))
                            elif SCons.Util.is_Tuple(i):
                                tmp.append(i)
                            else:
                                tmp.append((i,))
                        dk = tmp
                        # Construct a list of (key, value) tuples.
                        if SCons.Util.is_Dict(val):
                            tmp = []
                            for (k, v) in val.items():
                                if v is not None:
                                    tmp.append((k, v))
                                else:
                                    tmp.append((k,))
                            val = tmp
                        elif SCons.Util.is_String(val):
                            val = [(val,)]
                        if delete_existing:
                            dk = list(filter(lambda x, val=val: x not in val, dk))
                            self._dict[key] = dk + val
                        else:
                            dk = [x for x in dk if x not in val]
                            self._dict[key] = dk + val
                    else:
                        # By elimination, val is not a list.  Since dk is a
                        # list, wrap val in a list first.
                        if delete_existing:
                            dk = list(filter(lambda x, val=val: x not in val, dk))
                            self._dict[key] = dk + [val]
                        else:
                            if not val in dk:
                                self._dict[key] = dk + [val]
                else:
                    if key == 'CPPDEFINES':
                        if SCons.Util.is_String(dk):
                            dk = [dk]
                        elif SCons.Util.is_Dict(dk):
                            tmp = []
                            for (k, v) in dk.items():
                                if v is not None:
                                    tmp.append((k, v))
                                else:
                                    tmp.append((k,))
                            dk = tmp
                        if SCons.Util.is_String(val):
                            if val in dk:
                                val = []
                            else:
                                val = [val]
                        elif SCons.Util.is_Dict(val):
                            tmp = []
                            for i,j in val.items():
                                if j is not None:
                                    tmp.append((i,j))
                                else:
                                    tmp.append(i)
                            val = tmp
                    if delete_existing:
                        dk = [x for x in dk if x not in val]
                    self._dict[key] = dk + val
        self.scanner_map_delete(kw)
1304913
def duplicates(coll):
    
    return list(set(x for x in coll if coll.count(x) > 1))
676827
function findDuplicates(arrLogic) {
  return arrLogic.reduce((acc, x1, idx1) => {
    if (arrLogic.some((x2, idx2) => (idx1 !== idx2 && x1 === x2))) {
      acc.push(idx1);
    }
    return acc;
  }, []);
}
640902
def remove_dups(seq):
    """"""
    seen = set()
    seen_add = seen.add
    return [x for x in seq if not (x in seen or seen_add(x))]
1159177
def duplicates(self):
        
        self._params.update(
            href=self._resource.get('search_duplicate'))
        return self
709945
function cloneObj(obj, exclude) {
  var type = _typeof(obj);

  switch (type) {
    case 'undefined':
    case 'boolean':
    case 'nuber':
    case 'string':
    case 'function':
      return obj;
      break;

    case 'object':
      if (obj === null) {
        // null is object
        return obj;
      }

      var r;

      if (isArray(obj)) {
        r = [];
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = obj[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var item = _step3.value;
            r.push(cloneObj(item, exclude));
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      } else {
        r = {};

        for (var _i7 = 0, _Object$keys2 = Object.keys(obj); _i7 < _Object$keys2.length; _i7++) {
          var key = _Object$keys2[_i7];

          if (!exclude || isArray(exclude) && !exclude.includes(key) || !exclude(key, obj[key], obj)) {
            r[key] = cloneObj(obj[key], exclude);
          }
        }
      }

      return r;
      break;

    default:
      return obj;
      break;
  }
}
358564
def duplicates_removed(it, already_seen=()):
    
    lst = []
    seen = set()
    for i in it:
        if i in seen or i in already_seen:
            continue
        lst.append(i)
        seen.add(i)
    return lst
1280111
@Override
    public void dup()
    {
        if (top < 1)
        {
            throw new EmptyStackException();
        }
        if (top >= stack.length)
        {
            stack = Arrays.copyOf(stack, (int) (stack.length*growFactor));
        }
        top++;
        stack[top-1] = stack[top-2];
    }
1314161
def set_skips(self, skips):
        """"""
        skips.sort()
        internal_assert(lambda: len(set(skips)) == len(skips), "duplicate line skip(s) in skips", skips)
        self.skips = skips
755435
def skip_redundant(iterable, skipset=None):
    
    if skipset is None:
        skipset = set()
    for item in iterable:
        if item not in skipset:
            skipset.add(item)
            yield item
1244931
def __remove_duplicates(self, _other):
        """"""
        if not isinstance(_other, type(self)) \
           and not isinstance(_other, type(list)) \
           and not isinstance(_other, type([])):
            other = [_other]
        else:
            other = list(_other)

        # remove items already in self
        newother = []
        for i in range(0, len(other)):
            item = other.pop(0)
            if not list.__contains__(self, item):
                newother.append(item)

        # remove duplicate items in other
        other = []
        if newother != []:
            other.append(newother[0])
            for i in range(1, len(newother)):
                item = newother.pop()
                if not other.__contains__(item):
                    other.append(item)
        return other
209531
public void dup() {
        ClassNode type = getTopOperand();
        stack.add(type);
        MethodVisitor mv = controller.getMethodVisitor();
        if (type == ClassHelper.double_TYPE || type == ClassHelper.long_TYPE) {
            mv.visitInsn(DUP2);
        } else {
            mv.visitInsn(DUP);
        }
    }