Fired to each element of the group. Values are duplicated by default.
 Put dup to false to avoid this behavior.
174118
def set_mark(key, value, dup=true)
      self.each {|elm| elm.set_mark(key, (dup and not(Symbol===value)) ? value.dup : value)}
    end
119787
def do_group_by(self, element, decl, pseudo):
        """"""
        sort_css = groupby_css = flags = ''
        if ',' in decl.value:
            if decl.value.count(',') == 2:
                sort_css, groupby_css, flags = \
                        map(serialize, split(decl.value, ','))
            else:
                sort_css, groupby_css = map(serialize, split(decl.value, ','))
        else:
            sort_css = serialize(decl.value)
        if groupby_css.strip() == 'nocase':
            flags = groupby_css
            groupby_css = ''
        sort = css_to_func(sort_css, flags,
                           self.css_namespaces, self.state['lang'])
        groupby = css_to_func(groupby_css, flags,
                              self.css_namespaces, self.state['lang'])
        step = self.state[self.state['current_step']]

        target = self.current_target()
        target.sort = sort
        target.lang = self.state['lang']
        target.isgroup = True
        target.groupby = groupby
        #  Find current target, set its sort/grouping as well
        for pos, action in \
                enumerate(reversed(step['actions'])):
            if action[0] == 'target' and \
                    action[1].tree == element.etree_element:
                action[1].sort = sort
                action[1].isgroup = True
                action[1].groupby = groupby
                break
559197
def _group_changes(cur, wanted, remove=False):
    '''
    
    '''
    old = set(cur)
    new = set(wanted)
    if (remove and old != new) or (not remove and not new.issubset(old)):
        return True
    return False
363501
public void put(Interval1D<K> interval, V value) {
    Node<K, V> origNode = get(interval);
    if (origNode != null) {
      //System.err.println("Dupe is being put into the map. Interval: " + interval +
      //        "\n\tOld: " + origNode.getValue() + " New: " + value);
      origNode.setValue(value);
    } else {
      root = randomizedInsert(root, interval, value);
    }
  }
1159177
def duplicates(self):
        
        self._params.update(
            href=self._resource.get('search_duplicate'))
        return self
511296
def each_item(group=nil, &block)
      group = group || @groups

      group.each do |item|
        if item["items"]
          each_item(item["items"], &block)
        else
          block.call(item)
        end
      end
    end
1237721
function() {
        var value = '';
        this.$group.each(function(index, element) {
            if (element.checked) {
                value = $(element).val();
                return false;
            }
        });
        return value;
    }
11347
def duplicates(base, items):
    
    for item in items:
        if item.similarity(base) and not item.equality(base):
            yield item
1094008
protected function _duplicate()
    {
        $this->dupDocComment();
        $this->setReturnType($this->node->returnType);
        $this->addParams($this->node->params);
        $this->addStmts($this->node->stmts);
    }
803429
function unique (elements) {
  for (var i = 0; i < elements.length - 1; i++) {
    for (var j = i + 1; j < elements.length; j++) {
      if (elements[i] === elements[j]) return false
    }
  }

  return true
}
122302
def duplicate(self):
        '''
        
        '''
        return self.__class__(self.method, self.status, self.date, self.ref)
1339177
def regroup(self, group):
        
        if util.config.future_deprecations:
            self.param.warning('%s.regroup is deprecated, use relabel '
                               'method with a group argument instead.'
                               % type(self).__name__)
        new_items = [el.relabel(group=group) for el in self.data.values()]
        return reduce(lambda x,y: x+y, new_items)
846499
private void appendGroupingAttribute(final XMLUtil util, final Appendable appendable) throws IOException {
        if (this.grouping) util.appendAttribute(appendable, "number:grouping", "true");
    }
1134570
def de_duplicate(items):
    
    result = []
    for item in items:
        if item not in result:
            result.append(item)
    return result
580719
private static String keyToGoWithElementsString(String label, DuplicateGroupedAndTyped elements) {
    /*
     * elements.toString(), which the caller is going to use, includes the homogeneous type (if
     * any), so we don't want to include it here. (And it's better to have it in the value, rather
     * than in the key, so that it doesn't push the horizontally aligned values over too far.)
     */
    return lenientFormat("%s (%s)", label, elements.totalCopies());
  }
848104
function dup(x) {
    var i, buff;
    buff=new Array(x.length);
    copy_(buff,x);
    return buff;
  }
840285
private static Map<TextBlock, Integer> createIndexOfDuplicatedTextBlocks(Iterable<Duplication> duplications) {
    return extractAllDuplicatedTextBlocks(duplications)
      .stream().sorted()
      .collect(Collectors.toMap(e -> e, new TextBlockIndexGenerator(), (a, b) -> a, LinkedHashMap::new));
  }