Return both owners and shared alerts (if the shared flag is true).
@return  The list of shared alerts.
764267
private List<Alert> getAlertsObj(String alertname, PrincipalUser owner, boolean shared, boolean populateMetaFieldsOnly, Integer limit) {
		
		Set<Alert> result = new HashSet<>();
		
		result.addAll(_getAlertsByOwner(alertname, owner, populateMetaFieldsOnly));
		if(shared) {
			result.addAll(populateMetaFieldsOnly ? alertService.findSharedAlerts(true, null, limit) : alertService.findSharedAlerts(false, null, limit));
		}
		
		return new ArrayList<>(result);
	}
1157846
public java.lang.String getOwningGroup() {
    java.lang.Object ref = owningGroup_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        owningGroup_ = s;
      }
      return s;
    }
  }
250515
def owned_ec_states(self):
        ''''''
        with self._mutex:
            if not self._owned_ec_states:
                if self.owned_ecs:
                    states = []
                    for ec in self.owned_ecs:
                        states.append(self._get_ec_state(ec))
                    self._owned_ec_states = states
                else:
                    self._owned_ec_states = []
        return self._owned_ec_states
1337136
private List<Owner> getOwners(DashboardRemoteRequest request) throws HygieiaException {
        DashboardRemoteRequest.DashboardMetaData metaData = request.getMetaData();
        Owner owner = metaData.getOwner();
        List<Owner> owners = metaData.getOwners();

        if (owner == null && CollectionUtils.isEmpty(owners)) {
            throw new HygieiaException("There are no owner/owners field in the request", HygieiaException.INVALID_CONFIGURATION);
        }

        if (owners == null) {
            owners = new ArrayList<Owner>();
            owners.add(owner);
        } else if (owner != null) {
            owners.add(owner);
        }

        Set<Owner> uniqueOwners = new HashSet<Owner>(owners);
        return new ArrayList<Owner>(uniqueOwners);
    }
370607
def get_owner_emails(self, partial_owner_match=True):
        
        for tag in self.tags:
            if tag.key.lower() == 'owner':
                rgx = re.compile(RGX_EMAIL_VALIDATION_PATTERN, re.I)
                if partial_owner_match:
                    match = rgx.findall(tag.value)
                    if match:
                        return [NotificationContact('email', email) for email in match]
                else:
                    match = rgx.match(tag.value)
                    if match:
                        return [NotificationContact('email', email) for email in match.groups()]
        return None
1279516
public final synchronized L[] getListeners() {
        if (this.map == null) {
            return newArray(0);
        }
        List<L> list = new ArrayList<>();

        L[] listeners = this.map.get(null);
        if (listeners != null) {
            for (L listener : listeners) {
                list.add(listener);
            }
        }
        for (Entry<String, L[]> entry : this.map.entrySet()) {
            String name = entry.getKey();
            if (name != null) {
                for (L listener : entry.getValue()) {
                    list.add(newProxy(name, listener));
                }
            }
        }
        return list.toArray(newArray(list.size()));
    }
1067830
@JsonIgnore
	public List<Sysprop> getIdentifiers() {
		return CoreUtils.getInstance().getSearch().findTerms(getAppid(), Utils.type(Sysprop.class),
				Collections.singletonMap(Config._CREATORID, getId()), true);
	}
767545
@Override
    protected Collection<Long> getActivelyAttachedSessions() {
        return owner != null ? Collections.singleton(owner.sessionId()) : Collections.<Long>emptyList();
    }
1202129
def _get_ownership(self, data):
        
        rank = self.comm.rank

        B = [(rank, idx) for (idx, c) in enumerate(data) if c is not None]
        C = self.comm.allreduce(B)
        ownership = [None] * len(data)
        for c in C:
            ownership[c[1]] = c[0]
        return ownership
1315380
private Set<ISharedObjectSecurity> getSecurityHandlers() {
        ISharedObjectSecurityService security = (ISharedObjectSecurityService) ScopeUtils.getScopeService(getParent(), ISharedObjectSecurityService.class);
        if (security == null) {
            return null;
        }
        return security.getSharedObjectSecurity();
    }
798153
@Override
	public List<CommerceNotificationTemplateUserSegmentRel> findAll() {
		return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
51354
def get_owners(self):
        
        response = self._client.session.get(
            '{url}/list/owners'.format(url=self.endpoint_url)
        )
        return self.process_response(response)
308219
public java.util.List<String> getNotificationARNs() {
        if (notificationARNs == null) {
            notificationARNs = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return notificationARNs;
    }
1004290
public java.util.List<IpRuleItem> getUserRules() {
        if (userRules == null) {
            userRules = new com.amazonaws.internal.SdkInternalList<IpRuleItem>();
        }
        return userRules;
    }
753892
public List<ITenant> getTenantsList() {
        List<ITenant> rslt = new ArrayList<ITenant>(tenantDao.getAllTenants());
        Collections.sort(rslt);
        return rslt;
    }
739608
private List<Element> getInheritedPackagePrivateMethods() {
        List<Element> results = new ArrayList<>();
        for (TypeElement currentClass : visibleClasses) {
            if (currentClass != typeElement &&
                utils.isPackagePrivate(currentClass) &&
                !utils.isLinkable(currentClass)) {
                // Document these members in the child class because
                // the parent is inaccessible.
                results.addAll(classMap.get(currentClass).members);
            }
        }
        return results;
    }
1362384
def get_alerts_unarchived(self):
        """"""

        js = json.dumps({'_sort': '-time', 'archived': False})
        params = urllib.urlencode({'json': js})
        return self._read(self.api_url + 'list/alarm', params)