group           =   display-name ":" [group-list] ";" [CFWS]
498898
function group() {
        return wrap('group', and(
            displayName,
            literal(':'),
            opt(groupList),
            literal(';'),
            invis(opt(cfws))
        )());
    }
33642
def _get_device_names_in_group(self):
        '''
        '''

        device_names = []
        dg = pollster(self._get_device_group)(self.devices[0])
        members = dg.devices_s.get_collection()
        for member in members:
            member_name = member.name.replace('/%s/' % self.partition, '')
            device_names.append(member_name)
        return device_names
998885
public function listCategoryGroup()
    {
        $this->setTitleListCategoryGroup();
        $this->setBreadcrumbListCategoryGroup();
        $this->setFilterListCategoryGroup();
        $this->setPagerListCategoryGroup();

        $this->setData('category_groups', $this->getListCategoryGroup());
        $this->setData('category_group_types', $this->category_group->getTypes());

        $this->outputListCategoryGroup();
    }
1095650
private void addGroupName(int maxlength)
    {
        int maxisolength = 0;
        char offsets[] = new char[LINES_PER_GROUP_ + 2];
        char lengths[] = new char[LINES_PER_GROUP_ + 2];
        byte tokenlengths[] = new byte[m_tokentable_.length];

        // enumerate all groups
        // for (int i = m_groupcount_ - 1; i >= 0; i --) {
        for (int i = 0; i < m_groupcount_ ; i ++) {
            int offset = getGroupLengths(i, offsets, lengths);
            // enumerate all lines in each group
            // for (int linenumber = LINES_PER_GROUP_ - 1; linenumber >= 0;
            //    linenumber --) {
            for (int linenumber = 0; linenumber < LINES_PER_GROUP_;
                linenumber ++) {
                int lineoffset = offset + offsets[linenumber];
                int length = lengths[linenumber];
                if (length == 0) {
                    continue;
                }

                // read regular name
                int parsed[] = addGroupName(lineoffset, length, tokenlengths,
                                            m_nameSet_);
                if (parsed[0] > maxlength) {
                    // 0 for name length
                    maxlength = parsed[0];
                }
                lineoffset += parsed[1];
                if (parsed[1] >= length) {
                    // 1 for parsed group string length
                    continue;
                }
                length -= parsed[1];
                // read Unicode 1.0 name
                parsed = addGroupName(lineoffset, length, tokenlengths,
                                      m_nameSet_);
                if (parsed[0] > maxlength) {
                    // 0 for name length
                    maxlength = parsed[0];
                }
                lineoffset += parsed[1];
                if (parsed[1] >= length) {
                    // 1 for parsed group string length
                    continue;
                }
                length -= parsed[1];
                // read ISO comment
                parsed = addGroupName(lineoffset, length, tokenlengths,
                                      m_ISOCommentSet_);
                if (parsed[1] > maxisolength) {
                    maxisolength = length;
                }
            }
        }

        // set gMax... - name length last for threading
        m_maxISOCommentLength_ = maxisolength;
        m_maxNameLength_ = maxlength;
    }
731462
private static void section3(List<GroupingNotation> groupings, Map<String, String> mapIds) throws NotationException {

    for (GroupingNotation grouping : groupings) {
      GroupEntity groupID = grouping.getGroupID();
      if (mapIds.containsKey(groupID.getId())) {
        groupID = new GroupingNotation(mapIds.get(groupID.getId())).getGroupID();
      }

      String details = grouping.toHELM2().split("\\(")[1].split("\\)")[0];
      details = changeIDs(details, mapIds);
      helm2notation.addGrouping(new GroupingNotation(groupID, details));

    }
  }
7901
def get_groupnames(self, sgs):
        
        return ','.join([sgs[sg].get_name() for sg in self.servicegroups])
1220404
protected void appendGroupByClause(List groupByFields, StringBuffer buf)
    {
        if (groupByFields == null || groupByFields.size() == 0)
        {
            return;
        }

        buf.append(" GROUP BY ");
        for (int i = 0; i < groupByFields.size(); i++)
        {
            FieldHelper cf = (FieldHelper) groupByFields.get(i);
 
            if (i > 0)
            {
                buf.append(",");
            }

            appendColName(cf.name, false, null, buf);
        }
    }
559196
def groups_names(self):
        
        return _ListProxy(self._get_group_name_by_num(i) for i in range(self.groups_count))
584782
@Override
    String[] get_device_name_list(final boolean fwd) {
	synchronized (this) {
	    int i = 0;
	    final String[] dl = new String[get_size_i(fwd)];
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof GroupDeviceElement || fwd) {
		    final String[] sub_dl = e.get_device_name_list(fwd);
		    for (int j = 0; j < sub_dl.length; j++, i++) {
			dl[i] = sub_dl[j];
		    }
		}
	    }
	    return dl;
	}
    }
1273274
def getDisplayName( self ):
        "  "
        displayName = self.name
        if self.base:
            displayName += "( " + ", ".join( self.base ) + " )"
        return displayName
326272
public String getGroupName() {
		if (collapsibleToggle != null) {
			return collapsibleToggle.getId();
		} else if (!collapsibleList.isEmpty()) {
			// This is only to retain compatibility with the
			// previous implementation, and should be removed post-Sfp11,
			// as it doesn't make much sense to create a group without
			// something to toggle it.
			return collapsibleList.get(0).getId();
		}

		return "";
	}
1347686
def hosts_in_group(self, groupname):
        
        result = []
        for hostname, hostinfo in self.hosts.items():
            if groupname == 'all':
                result.append(hostname)
            elif 'groups' in hostinfo:
                if groupname in hostinfo['groups']:
                    result.append(hostname)
            else:
                hostinfo['groups'] = [groupname]
        return result
1153376
def compute_group_colors(self):
        """"""
        seen = set()
        self.group_label_color = [
            x for x in self.node_colors if not (x in seen or seen.add(x))
        ]
797114
def has_group(user, group_name):
    '''
    
    '''
    if user.groups.filter(name=group_name).exists():
        return True
    return False
511085
private static Set<GroupName> calculateNames(TimeSeriesCollection current, Collection<TimeSeriesCollection> backward, Collection<TimeSeriesCollection> forward) {
        final Set<GroupName> names = backward.stream()
                .flatMap(tsc -> tsc.getGroups(x -> true).stream())
                .collect(Collectors.toCollection(THashSet::new));
        names.retainAll(forward.stream()
                .flatMap(tsc -> tsc.getGroups(x -> true).stream())
                .collect(Collectors.toSet()));
        names.removeAll(current.getGroups(x -> true));
        return names;
    }
841786
void printCounters() {
    System.out.printf("New Job:\n", counters);
    for (String groupName : counters.getGroupNames()) {
      Counters.Group group = counters.getGroup(groupName);
      System.out.printf("\t%s[%s]\n", groupName, group.getDisplayName());

      for (Counters.Counter counter : group) {
        System.out.printf("\t\t%s: %s\n", counter.getDisplayName(),
                                          counter.getCounter());
      }
    }
    System.out.printf("\n");
  }
756628
function group($group)
    {
        if (!empty($group))
        {
            self::sql_safe($group);
            $this->group = "group by $group";
        }
        else
        {
            $this->group = '';
        }
    }