code: 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);
  	}
docs: Return both owners and shared alerts (if the shared flag is true).
  @return  The list of shared alerts.