code: public void assignGroup(XEvent event, String group) {
  		if (group != null && group.trim().length() > 0) {
  			XAttributeLiteral attr = (XAttributeLiteral) ATTR_GROUP.clone();
  			attr.setValue(group.trim());
  			event.getAttributes().put(KEY_GROUP, attr);
  		}
  	}
docs: Assigns the group attribute value for a given event.
  
  @param event
  Event to be modified.
  @param resource
  Group string to be assigned.