add a news source to the topic page
        @param sourceUri: uri of the news source to add to the topic page
        @param weight: importance of the news source (typically in range 1 - 50)
516061
def addSource(self, sourceUri, weight):
        
        assert isinstance(weight, (float, int)), "weight value has to be a positive or negative integer"
        self.topicPage["sources"].append({"uri": sourceUri, "wgt": weight})
976795
def source(self, newsource):
        """"""
        oldsource = self.source
        for feature in self:
            if feature.source == oldsource:
                feature._source = newsource
246562
public SourceUnit addSource(URL url) {
        return addSource(new SourceUnit(url, configuration, classLoader, getErrorCollector()));
    }
1291363
public void setIntentExtras(String subject, String text, Uri imageUri) {
        if (DEBUG) {
            Log.v(TAG, "setIntentExtras() subject=" + subject);
            Log.v(TAG, "setIntentExtras() text=" + text);
            Log.v(TAG, "setIntentExtras() imageUri=" + imageUri);
        }
        mIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
        mIntent.putExtra(Intent.EXTRA_TEXT, text);
        if (imageUri != null) {
            mIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
        }
    }
485979
public void addSeed(URI uri) {
		// Update the scope of the spidering process
		String host = null;

		try {
			host = uri.getHost();
			defaultFetchFilter.addScopeRegex(host);
		} catch (URIException e) {
			log.error("There was an error while adding seed value: " + uri, e);
			return;
		}
		// Add the seed to the list -- it will be added to the task list only when the spider is
		// started
		this.seedList.add(uri);
		// Add the appropriate 'robots.txt' as a seed
		if (getSpiderParam().isParseRobotsTxt()) {
			addRootFileSeed(uri, "robots.txt");
		}
		// Add the appropriate 'sitemap.xml' as a seed
		if (getSpiderParam().isParseSitemapXml()) {
			addRootFileSeed(uri, "sitemap.xml");
		}
		// And add '.svn/entries' as a seed, for SVN based spidering
		if (getSpiderParam().isParseSVNEntries()) {
			addFileSeed(uri, ".svn/entries", svnUrlPattern);
			addFileSeed(uri, ".svn/wc.db", svnUrlPattern);
		}

		// And add '.git/index' as a seed, for Git based spidering
		if (getSpiderParam().isParseGit()) {
			addFileSeed(uri, ".git/index", gitUrlPattern);
		}

	}
872850
@Indexable(type = IndexableType.REINDEX)
	@Override
	public CPMeasurementUnit addCPMeasurementUnit(
		CPMeasurementUnit cpMeasurementUnit) {
		cpMeasurementUnit.setNew(true);

		return cpMeasurementUnitPersistence.update(cpMeasurementUnit);
	}
885170
public void setSource(String newSource) {
        source = nfd.normalize(newSource);
        done = false;

        // catch degenerate case
        if (newSource.length() == 0) {
            pieces = new String[1][];
            current = new int[1];
            pieces[0] = new String[]{""};
            return;
        }

        // find the segments
        List<String> segmentList = new ArrayList<String>();
        int cp;
        int start = 0;

        // i should be the end of the first code point
        // break up the string into segements

        int i = UTF16.findOffsetFromCodePoint(source, 1);

        for (; i < source.length(); i += Character.charCount(cp)) {
            cp = source.codePointAt(i);
            if (nfcImpl.isCanonSegmentStarter(cp)) {
                segmentList.add(source.substring(start, i)); // add up to i
                start = i;
            }
        }
        segmentList.add(source.substring(start, i)); // add last one

        // allocate the arrays, and find the strings that are CE to each segment
        pieces = new String[segmentList.size()][];
        current = new int[segmentList.size()];
        for (i = 0; i < pieces.length; ++i) {
            if (PROGRESS) System.out.println("SEGMENT");
            pieces[i] = getEquivalents(segmentList.get(i));
        }
    }
1216501
def add_topic(self, topic):
        
        if topic in self._topics:
            return Future().success(set(self._topics))

        self._topics.add(topic)
        return self.cluster.request_update()
120960
public static String getURL(String sourceURI) {
        String retval = sourceURI;
        int qPos = sourceURI.indexOf("?");
        if (qPos != -1) {
            retval = retval.substring(0, qPos);
        }

        return retval;
    }
860581
@Override
	public IResource newResource(URI uri) {
		final String sourceMethod = "newResource"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AbstractAggregatorImpl.class.getName(), sourceMethod, new Object[]{uri});
		}
		Mutable<URI> uriRef = new MutableObject<URI>(uri);
		IResourceFactory factory = getResourceFactory(uriRef);
		IResource result;
		if (factory != null) {
			result = factory.newResource(uriRef.getValue());
		} else {
			result = new NotFoundResource(uriRef.getValue());
		}
		result = runConverters(result);
		if (isTraceLogging) {
			log.exiting(AbstractAggregatorImpl.class.getName(), sourceMethod, result);
		}
		return result;
	}
939402
public HttpMessage uri(final String requestUri) {
        setHeader(DynamicEndpointUriResolver.ENDPOINT_URI_HEADER_NAME, requestUri);
        setHeader(HttpMessageHeaders.HTTP_REQUEST_URI, requestUri);
        return this;
    }
989614
@Override
    public HttpRequest replaceUri(URI newURI) {
        return (new Builder()).uri(newURI)
        .headers(this.httpHeaders)
        .overrideConfig(this.getOverrideConfig())
        .queryParams(this.queryParams)
        .setRetriable(this.isRetriable())
        .loadBalancerKey(this.getLoadBalancerKey())
        .verb(this.getVerb())
        .entity(this.entity)
        .build();        
    }
425321
public void addExportPoint(String uri, String destination) {

        CmsExportPoint point = new CmsExportPoint(uri, destination);
        m_exportPoints.add(point);
        if (CmsLog.INIT.isInfoEnabled() && (point.getDestinationPath() != null)) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_ADD_EXPORT_POINT_2,
                    point.getUri(),
                    point.getDestinationPath()));
        }
    }
293551
public void setUri(String v) {
    if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_uri == null)
      jcasType.jcas.throwFeatMissing("uri", "de.julielab.jules.types.ace.SourceFile");
    jcasType.ll_cas.ll_setStringValue(addr, ((SourceFile_Type)jcasType).casFeatCode_uri, v);}
867400
public void addLabeledFolder(String uri) {

        m_labelSiteFolders.add(uri);
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_LABEL_LINKS_IN_FOLDER_1, uri));
        }
    }
246896
def add_source(self, tier):
        
        tier.add_dest(self)
        self.sources.append(tier)
168192
private void pushContentSource(char[] newBuffer) {
        nextContentSource = new ContentSource(nextContentSource, buffer, position, limit);
        buffer = newBuffer;
        position = 0;
        limit = newBuffer.length;
    }