Handle the targets addresses, adding aliases when defined
778524
def resolve_addresses(user, useralias, to, cc, bcc):
    
    addresses = {"recipients": []}
    if to is not None:
        make_addr_alias_target(to, addresses, "To")
    elif cc is not None and bcc is not None:
        make_addr_alias_target([user, useralias], addresses, "To")
    else:
        addresses["recipients"].append(user)
    if cc is not None:
        make_addr_alias_target(cc, addresses, "Cc")
    if bcc is not None:
        make_addr_alias_target(bcc, addresses, "Bcc")
    return addresses
1019969
def remove_aliases(target):
    

    if isinstance(target, model.Entry):
        orm.delete(p for p in model.PathAlias if p.entry == target)
    elif isinstance(target, model.Category):
        orm.delete(p for p in model.PathAlias if p.category == target)
    else:
        raise TypeError("Unknown type {}".format(type(target)))
    orm.commit()
830725
def replace_aliases(cut_dict, aliases):
    """"""
    for k, v in cut_dict.items():
        for k0, v0 in aliases.items():
            cut_dict[k] = cut_dict[k].replace(k0, '(%s)' % v0)
1264930
private void applyAliases(Map<FieldType, String> aliases)
   {
      CustomFieldContainer fields = m_project.getCustomFields();
      for (Map.Entry<FieldType, String> entry : aliases.entrySet())
      {
         fields.getCustomField(entry.getKey()).setAlias(entry.getValue());
      }
   }
288387
def load_target(cls, scheme, path, fragment, username,
                    password, hostname, port, query,
                    load_method, **kwargs):
        
        raise NotImplementedError("load_target must be overridden")
388801
def configure_alias(graph, ns, mappings):
    
    convention = AliasConvention(graph)
    convention.configure(ns, mappings)
67883
def process_target(str)
      if @root == true
        url(str =~ /^\// ? str : "/#{str}")
      else
        str =~ /^(http|https)/i ? str : url(str =~ /^\// ? str : "/#{str}")
      end
    end
1330701
def alias(self, source: type, target: Any) -> Any:
        
        self.register(target, lambda c: c.resolve(source))
471241
def _inject_target(self, target_adaptor):
    """"""
    target_cls = self._target_types[target_adaptor.type_alias]

    declared_deps = target_adaptor.dependencies
    implicit_deps = (Address.parse(s,
                                   relative_to=target_adaptor.address.spec_path,
                                   subproject_roots=self._address_mapper.subproject_roots)
                     for s in target_cls.compute_dependency_specs(kwargs=target_adaptor.kwargs()))
    for dep in declared_deps:
      self._dependent_address_map[dep].add(target_adaptor.address)
    for dep in implicit_deps:
      self._implicit_dependent_address_map[dep].add(target_adaptor.address)
1063375
function(addresses) {
		var defered = q.defer();
		var currentStep = 0;
		var numSteps = addresses.length;
		var results = [];

		var handleReadSuccess = function(res) {
			results.push({'address': addresses[currentStep], 'isErr': false, 'data': res});
			if(currentStep < numSteps) {
				currentStep += 1;
				performRead();
			} else {
				defered.resolve(results);
			}
		};
		var handleReadError = function(err) {
			results.push({'address': addresses[currentStep], 'isErr': true, 'data': err});
			if(currentStep < numSteps) {
				currentStep += 1;
				performRead();
			} else {
				defered.resolve(results);
			}
		};
		var performRead = function() {
			self.qRead(addresses[currentStep])
			.then(handleReadSuccess, handleReadError);
		};

		performRead();

		return defered.promise;
	}
716434
def validate_target(target)
      error_message = "You can't specify target (#{target}) as alias because it is real action name"
      raise Error, error_message if aliased_actions.values.flatten.include? target
    end
502856
void handleAddresses(
      List<LbAddressGroup> newLbAddressGroups, List<EquivalentAddressGroup> newBackendServers) {
    if (newLbAddressGroups.isEmpty()) {
      // No balancer address: close existing balancer connection and enter fallback mode
      // immediately.
      shutdownLbComm();
      syncContext.execute(new FallbackModeTask());
    } else {
      LbAddressGroup newLbAddressGroup = flattenLbAddressGroups(newLbAddressGroups);
      startLbComm(newLbAddressGroup);
      // Avoid creating a new RPC just because the addresses were updated, as it can cause a
      // stampeding herd. The current RPC may be on a connection to an address not present in
      // newLbAddressGroups, but we're considering that "okay". If we detected the RPC is to an
      // outdated backend, we could choose to re-create the RPC.
      if (lbStream == null) {
        startLbRpc();
      }
      // Start the fallback timer if it's never started
      if (fallbackTimer == null) {
        fallbackTimer = syncContext.schedule(
            new FallbackModeTask(), FALLBACK_TIMEOUT_MS, TimeUnit.MILLISECONDS, timerService);
      }
    }
    fallbackBackendList = newBackendServers;
    if (usingFallbackBackends) {
      // Populate the new fallback backends to round-robin list.
      useFallbackBackends();
    }
    maybeUpdatePicker();
  }
259380
def handle_address_save(self, sender, instance, **kwargs):
    
    objects = self.find_associated_with_address(instance)
    for obj in objects:
      self.handle_save(obj.__class__, obj)
1107435
function Addresses (f1, options) {
  var opts = options || {
    resourceName: 'address',
    resourceNamePlural: 'addresses'
  }
  if (!opts.resourceName) {
    opts.resourceName = 'address'
  }
  F1Resource.call(this, f1, opts)
}
1249609
def set_aliases(self, new_value):
        ""
        try:
            self.aliases = new_value
        except Exception as err:
            raise ValueError("invalid value: {}".format(err))
776939
def not_as_alias_handler(names_list):
    """"""
    list_ = list()
    for alias in names_list:
        list_.append(alias.name)
    return list_
962262
def make_alias(self, entry):
        
        entry.add_alias(self)
        self.alias = entry
        self.scope = entry.scope  # Local aliases can be "global" (static)
        self.byref = entry.byref
        self.offset = entry.offset
        self.addr = entry.addr