TODO Merge into r.addSourceTargetSet, to avoid duplicate testing
8423
void addSourceTargetSet(UnicodeSet filter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        UnicodeSet currentFilter = new UnicodeSet(filter);
        UnicodeSet revisiting = new UnicodeSet();
        int count = ruleVector.size();
        for (int i=0; i<count; ++i) {
            TransliterationRule r = ruleVector.get(i);
            r.addSourceTargetSet(currentFilter, sourceSet, targetSet, revisiting.clear());
            currentFilter.addAll(revisiting);
        }
    }
590928
@Override
    public T addAsResource(String resourceName, ArchivePath target, ClassLoader classLoader)
        throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName should be specified");
        Validate.notNull(target, "Target should be specified");
        Validate.notNull(classLoader, "ClassLoader should be specified");

        return addAsResource(new ClassLoaderAsset(resourceName, classLoader), target);
    }
1225454
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        SourceTargetUtility cache;
        synchronized (SOURCE_CACHE) {
            //String id = getID();
            cache = SOURCE_CACHE.get(norm2);
            if (cache == null) {
                cache = new SourceTargetUtility(new NormalizingTransform(norm2), norm2);
                SOURCE_CACHE.put(norm2, cache);
            }
        }
        cache.addSourceTargetSet(this, inputFilter, sourceSet, targetSet);
    }
681247
function compileJSSource(ComponentClass) {
    var sourceBuffer = new CompileSourceBuffer();
    var contextId = genSSRId();

    sourceBuffer.addRendererStart();
    var renderId = compileComponentSource(sourceBuffer, ComponentClass, contextId);
    sourceBuffer.addRaw('return componentRenderers.' + renderId + '(data, noDataOutput)');
    sourceBuffer.addRendererEnd();

    return sourceBuffer.toCode();
}
254722
@Override
    public T addAsManifestResources(Package resourcePackage, String... resourceNames) throws IllegalArgumentException {
        Validate.notNull(resourcePackage, "ResourcePackage must be specified");
        Validate.notNullAndNoNullValues(resourceNames,
            "ResourceNames must be specified and can not container null values");
        for (String resourceName : resourceNames) {
            addAsManifestResource(resourcePackage, resourceName);
        }
        return covarientReturn();
    }
513494
private void emitOutputFromTemplates (
            final List<Map<String, String>> groupMaps,
            final List<Map<String, String>> featureMaps)
    {
        try {
            /* ------------------------------------------------------------------- */
            /* You should do this ONLY ONCE in the whole application life-cycle:   */
            final Configuration cfg = new Configuration(Configuration.VERSION_2_3_23);
            cfg.setObjectWrapper(new DefaultObjectWrapper(Configuration.VERSION_2_3_23));

            // We need to set up a scheme to load our settings from wherever they may live.
            // This means we need to set up a multi-loader including the classpath and any specified options:

            TemplateLoader templateLoader;

            // Only add the settings directory if we're supposed to:
            if ( useDefaultTemplates ) {
                templateLoader = new ClassTemplateLoader(getClass(), DEFAULT_SETTINGS_CLASSPATH);
            }
            else {
                templateLoader = new FileTemplateLoader(new File(settingsDir.getPath()));
            }

            // Tell freemarker to load our templates as we specified above:
            cfg.setTemplateLoader(templateLoader);

            // Generate one template file for each work unit
            workUnits.stream().forEach(workUnit -> processWorkUnitTemplate(cfg, workUnit, groupMaps, featureMaps));
            processIndexTemplate(cfg, new ArrayList<>(workUnits), groupMaps);

        } catch (FileNotFoundException e) {
            throw new RuntimeException("FileNotFoundException processing javadoc template", e);
        } catch (IOException e) {
            throw new RuntimeException("IOException processing javadoc template", e);
        }
    }
289283
function() {
            var self            = this,
                target          = null,
                el              = null,
                dataset         = null,
                i               = -1;

            self.callActions('beforeIndexTargets', arguments);

            self.dom.targets = self.config.layout.allowNestedTargets ?
                self.dom.container.querySelectorAll(self.config.selectors.target) :
                h.children(self.dom.container, self.config.selectors.target, self.dom.document);

            self.dom.targets = h.arrayFromList(self.dom.targets);

            self.targets = [];

            if ((dataset = self.config.load.dataset) && dataset.length !== self.dom.targets.length) {
                throw new Error(mixitup.messages.errorDatasetPrerenderedMismatch());
            }

            if (self.dom.targets.length) {
                for (i = 0; el = self.dom.targets[i]; i++) {
                    target = new mixitup.Target();

                    target.init(el, self, dataset ? dataset[i] : void(0));

                    target.isInDom = true;

                    self.targets.push(target);
                }

                self.dom.parent = self.dom.targets[0].parentElement === self.dom.container ?
                    self.dom.container :
                    self.dom.targets[0].parentElement;
            }

            self.origOrder = self.targets;

            self.callActions('afterIndexTargets', arguments);
        }
1303494
@Override
    public T addAsManifestResource(String resourceName, String target) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsManifestResource(fileFromResource(resourceName), target);
    }
997052
@Override
    public T addAsWebInfResources(final Package resourcePackage, final String... resourceNames)
        throws IllegalArgumentException {
        Validate.notNull(resourcePackage, "ResourcePackage must be specified");
        Validate.notNullAndNoNullValues(resourceNames,
            "ResourceNames must be specified and can not container null values");
        for (String resourceName : resourceNames) {
            addAsWebInfResource(resourcePackage, resourceName);
        }
        return covarientReturn();
    }
709809
function setTarget(target) {
        var targetMethods = {};
        for (var name in methods) {
            targetMethods[name] = wrapMethod(target, methods[name]);
        }
        return targetMethods;
    }
174169
protected static void checkSameExecutionContext(DataSet<?> set1, DataSet<?> set2) {
		if (set1.getExecutionEnvironment() != set2.getExecutionEnvironment()) {
			throw new IllegalArgumentException("The two inputs have different execution contexts.");
		}
	}
717748
public void createAllDevNullTargets(Exception lastWriteException)
    {
        Map<Integer, SnapshotDataTarget> targets = Maps.newHashMap();
        final AtomicInteger numTargets = new AtomicInteger();

        for (Deque<SnapshotTableTask> tasksForSite : m_taskListsForHSIds.values()) {
            for (SnapshotTableTask task : tasksForSite) {
                // Close any created targets and replace them with DevNull, go web-scale
                if (task.getTarget(true) != null) {
                    try {
                        task.getTarget().close();
                    } catch (Exception e) {
                        SNAP_LOG.error("Failed closing data target after error", e);
                    }
                }

                SnapshotDataTarget target = targets.get(task.m_table.getRelativeIndex());
                if (target == null) {
                    target = new DevNullSnapshotTarget(lastWriteException);
                    final Runnable onClose = new TargetStatsClosure(target,
                            task.m_table.getTypeName(),
                            numTargets,
                            m_snapshotRecord);
                    target.setOnCloseHandler(onClose);

                    targets.put(task.m_table.getRelativeIndex(), target);
                    m_targets.add(target);
                    numTargets.incrementAndGet();
                }

                task.setTarget(target);
            }
        }
    }
1123370
function modifyTarget(target, source, sourceKeys, filters, overrideKeys) {

    // Arguments available to each filter.
    var filterContext = {
        target: target, // readonly
        source: source, // readonly
        sourceKey: null, // readonly
        targetKey: null,
        sourceValue: null
    };

    // For each property, send it through the filter pipeline and
    // then apply it to the target object.
    for (var sourceKey in sourceKeys) {
        filterContext.sourceKey = sourceKey;
        filterContext.targetKey = sourceKeys[sourceKey];

        // Throw an error if the source property name doesn't refer to a value.
        if (!(sourceKey in source)) {
            errorManager.propertyNotFound(sourceKey, source);
        }
        filterContext.sourceValue = source[sourceKey];

        // Apply the filters to the property.
        for (var i = 0; i < filters.length; i++) {
            if (!filters[i](filterContext)) {
                // Don't apply this property to the target.
                filterContext.targetKey = null;
                break;
            }
        }

        // Apply property to target.
        if (filterContext.targetKey !== null) {
            // Allow overwrite to take place. Developer can ignore error.
            var overwritten = filterContext.targetKey in target;

            target[filterContext.targetKey] = filterContext.sourceValue;

            if (overwritten && !overrideKeys[sourceKey]) {
                errorManager.propertyOverride(filterContext.targetKey, target);
            }
        }
    }
}
702132
@Override
    public T addAsManifestResource(Package resourcePackage, String resourceName) throws IllegalArgumentException {
        Validate.notNull(resourcePackage, "ResourcePackage must be specified");
        Validate.notNull(resourceName, "ResourceName must be specified");

        String classloaderResourceName = AssetUtil.getClassLoaderResourceName(resourcePackage, resourceName);
        ArchivePath target = ArchivePaths.create(classloaderResourceName);

        return addAsManifestResource(resourcePackage, resourceName, target);
    }
1245821
def add_for_targets(self, targets, classpath_elements):
    """"""
    for target in targets:
      self.add_for_target(target, classpath_elements)
314280
function(key, target, source) {
		var tval = target[key];
		var sval = source[key];

		if (helpers.isObject(tval) && helpers.isObject(sval)) {
			helpers.mergeIf(tval, sval);
		} else if (!target.hasOwnProperty(key)) {
			target[key] = helpers.clone(sval);
		}
	}
1075594
public void merge
			(Model target, Model... sources)
	{
		// Empty merged and added elements sets
		mergedElements.clear();
		addedElements.clear();

		// Fill equivalence map with objects from  target model
		Set<BioPAXElement> targetElements = target.getObjects();
		for (BioPAXElement t_bpe : targetElements)
		{
			this.addIntoEquivalanceMap(t_bpe);
		}

		// Try to insert every biopax element in every source one by one
		for (Model source : sources)
		{
			Set<BioPAXElement> sourceElements = source.getObjects();
			for (BioPAXElement bpe : sourceElements)
			{
				insert(target, bpe);
			}
		}
	}