:type sources: list[DFAdapter]
        :type target: DFAdapter
347564
def execute(self, sources, target):
        
        fields = self._get_fields_list_from_eps(sources)
        ret_fields = fields[0]
        if self.clear_feature:
            ret_fields = list(self._remove_field_roles(ret_fields, set(six.iterkeys(self.field_mapping)),
                                                       FieldRole.FEATURE))
        target._ml_fields = list(self._set_singleton_role(ret_fields, self.field_mapping))
257228
def getalignedtarget(self, index):
        """"""
        targetindices = []
        target = None
        foundindex = -1
        for sourceindex, targetindex in self.alignment:
            if sourceindex == index:
                targetindices.append(targetindex)
        if len(targetindices) > 1:
            for i in range(1,len(targetindices)):
                if abs(targetindices[i] - targetindices[i-1]) != 1:
                    break  # not consecutive
            foundindex = (min(targetindices), max(targetindices))
            target = ' '.join(self.target[min(targetindices):max(targetindices)+1])
        elif targetindices:
            foundindex = targetindices[0]
            target = self.target[foundindex]

        return target, foundindex
1370377
def ds_list(self):      # NOTE: how to name to distinguish from locally configured datastream objects?
        
        # FIXME: how to make access to a versioned ds_list ?

        if self._ds_list is None:
            self._ds_list = self._get_datastreams()
        return self._ds_list
1074807
def _get_flat_db_sources(self, model):
        
        sources = []
        for source in self.sources:
            for sub_source in self.expand_source(source):
                target_field = self.resolve_source(model, sub_source)
                if target_field:
                    sources.append(sub_source)
        return sources
335818
def add_dependency (self, targets, sources):
        
        if isinstance (targets, str):
            targets = [targets]
        if isinstance (sources, str):
            sources = [sources]
        assert is_iterable(targets)
        assert is_iterable(sources)

        for target in targets:
            for source in sources:
                self.do_add_dependency (target, source)
825658
def execute(self, sources, target):
        
        existing_ml_fields = self._get_fields_list_from_eps(sources)
        dup_ml_fields = [f.copy() for f in self.fields]
        if self.is_append:
            src = list([copy.deepcopy(f) for f in existing_ml_fields[0]])
            src.extend(dup_ml_fields)
            target._ml_fields = src
        else:
            target._ml_fields = self.fields
884545
def _calculate_python_sources(self, targets):
    """"""
    python_eval_targets = filter(self.is_non_synthetic_python_target, targets)
    sources = set()
    for target in python_eval_targets:
      sources.update(
        source for source in target.sources_relative_to_buildroot()
        if os.path.splitext(source)[1] == self._PYTHON_SOURCE_EXTENSION
      )
    return list(sources)
618356
def add_sources(self, source_info_dict):
        
        self._source_info_dict.update(source_info_dict)
        for key, value in source_info_dict.items():
            self._sources.update(make_sources(key, value))
1005362
def _load_general(data, targets):
    """"""
    for d_src, d_targets in zip(data, targets):
        if isinstance(d_targets, nd.NDArray):
            d_src.copyto(d_targets)
        else:
            assert d_targets[-1][0].stop == d_src.shape[0], \
                "Batch size miss match. Expected %d, got %d"%( \
                    d_targets[-1][0].stop, d_src.shape[0])
            for slice_idx, d_dst in d_targets:
                d_src[slice_idx].copyto(d_dst)
226252
def get_sources(self, kind='all'):
        
        assert kind in ('all', 'indep', 'mutex'), kind
        sources = []
        for sm in self.source_models:
            for src_group in sm.src_groups:
                if kind in ('all', src_group.src_interdep):
                    for src in src_group:
                        if sm.samples > 1:
                            src.samples = sm.samples
                        sources.append(src)
        return sources
628625
def _compute_sources_for_target(self, target):
    """"""
    def resolve_target_sources(target_sources):
      resolved_sources = []
      for tgt in target_sources:
        if tgt.has_sources():
          resolved_sources.extend(tgt.sources_relative_to_buildroot())
      return resolved_sources

    sources = [s for s in target.sources_relative_to_buildroot() if self._sources_predicate(s)]
    # TODO: Make this less hacky. Ideally target.java_sources will point to sources, not targets.
    if hasattr(target, 'java_sources') and target.java_sources:
      sources.extend(resolve_target_sources(target.java_sources))
    return sources
1342658
def add_sources(self, sources):
        """"""
        # TODO(batch):  extend to multiple batches
        assert (len(self.batches) == 1)
        # TODO(batch):  remove duplicates?
        sources = [x for x in sources if x not in self.batches[0].sources]
        self.batches[0].sources.extend(sources)
100626
def _write_source_data(self, sources):
        
        for i, source in enumerate(sources):
            self._write_source(source)
1181058
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        UnicodeSet myFilter = getFilterAsUnicodeSet(inputFilter);
        if (!myFilter.containsAll(UnicodeNameTransliterator.OPEN_DELIM) || !myFilter.contains(CLOSE_DELIM)) {
            return; // we have to contain both prefix and suffix
        }
        UnicodeSet items = new UnicodeSet()
        .addAll('0', '9')
        .addAll('A', 'F')
        .addAll('a', 'z') // for controls
        .add('<').add('>') // for controls
        .add('(').add(')') // for controls
        .add('-')
        .add(' ')
        .addAll(UnicodeNameTransliterator.OPEN_DELIM)
        .add(CLOSE_DELIM);
        items.retainAll(myFilter);
        if (items.size() > 0) {
            sourceSet.addAll(items);
            // could produce any character
            targetSet.addAll(0, 0x10FFFF);
        }
    }
1210860
def create_from_targets(self,list_targs):
        
        for this_target in list_targs:
            self.node.append(this_target.get_node())
1142333
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        // Each form consists of a prefix, suffix,
        // * radix, minimum digit count, and maximum digit count.  These
        // * values are stored as a five character header. ...
        UnicodeSet myFilter = getFilterAsUnicodeSet(inputFilter);
        UnicodeSet items = new UnicodeSet();
        StringBuilder buffer = new StringBuilder();
        for (int i = 0; spec[i] != END;) {
            // first 5 items are header
            int end = i + spec[i] + spec[i+1] + 5;
            int radix = spec[i+2];
            for (int j = 0; j < radix; ++j) {
                Utility.appendNumber(buffer, j, radix, 0);
            }
            // then add the characters
            for (int j = i + 5; j < end; ++j) {
                items.add(spec[j]);
            }
            // and go to next block
            i = end;
        }
        items.addAll(buffer.toString());
        items.retainAll(myFilter);

        if (items.size() > 0) {
            sourceSet.addAll(items);
            targetSet.addAll(0,0x10FFFF); // assume we can produce any character
        }
    }
394514
function list(delta = 5) {
    return selectedFrame.list(delta)
      .then(null, (error) => {
        print('You can\'t list source code right now');
        throw error;
      });
  }