Adds the given source's stats.
544326
def addSource(self, source, data):
    """"""
    self._aggregate(source, self._aggregators, data, self._result)
288992
def _add_source(model):
    
    ignored_keys = {"author_tags", "original_xml", "additional_info"}

    # convert all values to source strings
    source = "Aleph"
    for key, val in model.get_mapping().iteritems():
        if key in ignored_keys:
            continue

        if type(val) in [list, tuple]:
            ss_val = [
                SourceString(item, source).to_dict()
                for item in val
            ]
        else:
            ss_val = [SourceString(val, source).to_dict()]

        setattr(model, key, ss_val)

    return model
840308
def addCorpusId(self, value):
        '''
        '''
        if isinstance(value, Corpus_Id):
            self.corpus_ids.append(value)
        else:
            raise (TypeError,
                   'source_id Type should be Source_Id, not %s' % type(source_id))
535288
public void addCustomerSource(
            @NonNull String sourceId,
            @NonNull @Source.SourceType String sourceType,
            @Nullable SourceRetrievalListener listener) {
        final Map<String, Object> arguments = new HashMap<>();
        arguments.put(KEY_SOURCE, sourceId);
        arguments.put(KEY_SOURCE_TYPE, sourceType);

        final String operationId = UUID.randomUUID().toString();
        if (listener != null) {
            mSourceRetrievalListeners.put(operationId, listener);
        }
        mEphemeralKeyManager.retrieveEphemeralKey(operationId, ACTION_ADD_SOURCE, arguments);
    }
1190598
public void add(Collection<ConfigurationMetadataSource> sources) {
		for (ConfigurationMetadataSource source : sources) {
			String groupId = source.getGroupId();
			ConfigurationMetadataGroup group = this.allGroups.get(groupId);
			if (group == null) {
				group = new ConfigurationMetadataGroup(groupId);
				this.allGroups.put(groupId, group);
			}
			String sourceType = source.getType();
			if (sourceType != null) {
				putIfAbsent(group.getSources(), sourceType, source);
			}
		}
	}
1260912
public void addSchemaSource(Source s) {
        sources.add(s);
        validator.setSchemaSources(sources.toArray(new Source[0]));
    }
1232914
def add_content(self, more_content):
        """"""
        sourcename = self.get_sourcename()

        if self.object.docs:
            self.add_line('', sourcename)
            for line in self.object.docs.splitlines():
                self.add_line(line, sourcename)

        # add additional content (e.g. from document), if present
        if more_content:
            self.add_line('', sourcename)
            for line, src in zip(more_content.data, more_content.items):
                self.add_line(line, src[0], src[1])
955113
def build_stats(counts):
    """"""
    stats = {
        'status': 0,
        'reportnum': counts['reportnum'],
        'title': counts['title'],
        'author': counts['auth_group'],
        'url': counts['url'],
        'doi': counts['doi'],
        'misc': counts['misc'],
    }
    stats_str = "%(status)s-%(reportnum)s-%(title)s-%(author)s-%(url)s-%(doi)s-%(misc)s" % stats
    stats["old_stats_str"] = stats_str
    stats["date"] = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    stats["version"] = version
    return stats
1042059
def update(self, input_stats=None):
        """"""
        input_stats = input_stats or {}

        # Force update of all the stats
        super(GlancesStatsServer, self).update()

        # Build all_stats variable (concatenation of all the stats)
        self.all_stats = self._set_stats(input_stats)
1323714
public void addAddProduct(String source, String name, String value, Confidence confidence) {
        addProduct.add(new Evidence(source, name, value, confidence));
    }
1245746
private void addSource() {

    	// TODO this should be shared between here and IDLReader
    	File generatedSources = new File(getBaseDir(), generatedSourceDir);

        this.getProject().addCompileSourceRoot( generatedSources.getAbsolutePath() );
        this.getLog().debug( "Source directory " + generatedSources + " added." );
	}
1012118
public void add(String[] types, OsgiModelSource<?> source) {
        for (String resourceType : types) {
            this.typeNameToModelSourcesMap.put(resourceType, source);
        }
        clearLookupCaches();
    }
600722
def persist_compilestats(run, session, stats):
    
    for stat in stats:
        stat.run_id = run.id
        session.add(stat)
1138291
def add_source(self, url, **kwargs):
        
        self['sources'].append(dict(url=url, **kwargs))
334617
def add_data_file(data_files, target, source):
    """"""
    for t, f in data_files:
        if t == target:
            break
    else:
        data_files.append((target, []))
        f = data_files[-1][1]
    if source not in f:
        f.append(source)
666588
private void addReplicaStatsOf(RecordStore recordStore, LocalMapOnDemandCalculatedStats onDemandStats) {
        if (!hasRecords(recordStore)) {
            return;
        }

        long backupEntryCount = 0;
        long backupEntryMemoryCost = 0;

        int totalBackupCount = recordStore.getMapContainer().getTotalBackupCount();
        for (int replicaNumber = 1; replicaNumber <= totalBackupCount; replicaNumber++) {
            int partitionId = recordStore.getPartitionId();
            Address replicaAddress = getReplicaAddress(partitionId, replicaNumber, totalBackupCount);
            if (!isReplicaAvailable(replicaAddress, totalBackupCount)) {
                printWarning(partitionId, replicaNumber);
                continue;
            }
            if (isReplicaOnThisNode(replicaAddress)) {
                backupEntryMemoryCost += recordStore.getOwnedEntryCost();
                backupEntryCount += recordStore.size();
            }
        }

        if (NATIVE != recordStore.getMapContainer().getMapConfig().getInMemoryFormat()) {
            onDemandStats.incrementHeapCost(backupEntryMemoryCost);
        }
        onDemandStats.incrementBackupEntryMemoryCost(backupEntryMemoryCost);
        onDemandStats.incrementBackupEntryCount(backupEntryCount);
        onDemandStats.setBackupCount(recordStore.getMapContainer().getMapConfig().getTotalBackupCount());
    }
1154465
public void addSharedFunction(ISource source) {
		String fileName = source instanceof FileSource ? ((FileSource)source).getFileName() : null;
		doAddSharedFunction(source, fileName);
	}