Perform replacements from all {@link Replacer} implementations to given dataset
registered in {@link #dbUnitConfig}.
968292
private IDataSet performReplacements(IDataSet dataSet, List<Replacer> replacersList) {

        if (replacersList == null || replacersList.isEmpty())
            return dataSet;

        ReplacementDataSet replacementSet = new ReplacementDataSet(dataSet);
        // convert to set to remove duplicates
        Set<Replacer> replacers = new HashSet<>((List<Replacer>) replacersList);
        for (Replacer replacer : replacers) {
            replacer.addReplacements(replacementSet);
        }

        return replacementSet;
    }
512614
public Data replace(Iterable<Property> replacement) {
        if (Iterables.isEmpty(replacement)) {
            return this;
        }
        Map<String, Property> map = getDataAsMap(replacement);

        List<Property> props = this.stream().
                map(f -> map.getOrDefault(f.getName(), f)).
                collect(Collectors.toList());

        return new Data(props);
    }
39770
public List<V> replace(K key, Collection<? extends V> values) {
		List<V> replaced = removeAll(key);
		putAll(key, values);
		return replaced;
	}
811053
public void fit(@NonNull MultiDataSet dataSet) {
        List<S.Builder> featureNormBuilders = new ArrayList<>();
        List<S.Builder> labelNormBuilders = new ArrayList<>();

        fitPartial(dataSet, featureNormBuilders, labelNormBuilders);

        featureStats = buildList(featureNormBuilders);
        if (isFitLabel()) {
            labelStats = buildList(labelNormBuilders);
        }
    }
671000
public static Converter<String,String> replaceDataReferencesConverter(final Map<String, Map<String, String>> data) {
        return replaceDataReferencesConverter(data, null, false);
    }
444733
public void fit(@NonNull MultiDataSetIterator iterator) {
        List<S.Builder> featureNormBuilders = new ArrayList<>();
        List<S.Builder> labelNormBuilders = new ArrayList<>();

        iterator.reset();
        while (iterator.hasNext()) {
            MultiDataSet next = iterator.next();
            fitPartial(next, featureNormBuilders, labelNormBuilders);
        }

        featureStats = buildList(featureNormBuilders);
        if (isFitLabel()) {
            labelStats = buildList(labelNormBuilders);
        }
    }
256108
public int replace(Object dependency, ValueSet valueSet) {
        int returnCode = HTODDynacache.NO_EXCEPTION;
        dependencyNotUpdatedTable.remove(dependency);
        if (valueSet != null && valueSet.size() > this.delayOffloadEntriesLimit) {
            dependencyToEntryTable.remove(dependency);
            if (this.type == DEP_ID_TABLE) {
                returnCode = this.htod.writeValueSet(HTODDynacache.DEP_ID_DATA, dependency, valueSet, HTODDynacache.ALL);  // valueSet may be empty after writeValueSet
                this.htod.cache.getCacheStatisticsListener().depIdsOffloadedToDisk(dependency);
                //System.out.println("***** replace dependency id=" + dependency + " size=" + valueSet.size());
            } else {
                returnCode = this.htod.writeValueSet(HTODDynacache.TEMPLATE_ID_DATA, dependency, valueSet, HTODDynacache.ALL);  // valueSet may be empty after writeValueSet
                this.htod.cache.getCacheStatisticsListener().templatesOffloadedToDisk(dependency);
                //System.out.println("***** replace template id=" + dependency + " size=" + valueSet.size());
            }
        } else {
            if (valueSet.size() > 0) {
                dependencyToEntryTable.put(dependency, valueSet);
            } else {
                dependencyToEntryTable.remove(dependency);
            }
        }
        if (returnCode == HTODDynacache.DISK_SIZE_OVER_LIMIT_EXCEPTION && valueSet.size() > 0) {
            this.htod.delCacheEntry(valueSet, CachePerf.DISK_OVERFLOW, CachePerf.LOCAL, 
                                    !Cache.FROM_DEPID_TEMPLATE_INVALIDATION, 
                                    HTODInvalidationBuffer.FIRE_EVENT);
            returnCode = HTODDynacache.NO_EXCEPTION;
        }
        return returnCode;
    }
509818
public void setSubstitutions(java.util.Map<String, java.util.List<String>> substitutions) {
        this.substitutions = substitutions;
    }
204509
public void replaceGroup(int replaced, @Nullable List<L> groups) {

        if (replaced < 0 || replaced >= mCards.size() || groups == null || groups.size() == 0)
            // invalid index
            return;

        List<L> cards = getGroups();

        boolean changed = cards.addAll(replaced + 1, groups);

        if (changed) {
            cards.remove(replaced);
            setData(cards);
        }
    }
925892
public void replaceNumericFeatures(List<Vec> newNumericFeatures)
    {
        if(this.size() != newNumericFeatures.size())
            throw new RuntimeException("Input list does not have the same not of dataums as the dataset");
        
        for(int i = 0; i < newNumericFeatures.size(); i++)
        {
            DataPoint dp_i = getDataPoint(i);
            setDataPoint(i, new DataPoint(newNumericFeatures.get(i), dp_i.getCategoricalValues(), dp_i.getCategoricalData()));
        }
        
        this.numNumerVals = getDataPoint(0).numNumericalValues();
        if (this.numericalVariableNames != null)
            this.numericalVariableNames.clear();
            
    }
1362331
@Override
    public void addSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) {
        sourceSet.addAll(getFilterAsUnicodeSet(inputFilter));
        for (EscapeTransliterator it = this; it != null ; it = it.supplementalHandler) {
            if (inputFilter.size() != 0) {
                targetSet.addAll(it.prefix);
                targetSet.addAll(it.suffix);
                StringBuilder buffer = new StringBuilder();
                for (int i = 0; i < it.radix; ++i) {
                    Utility.appendNumber(buffer, i, it.radix, it.minDigits);
                }
                targetSet.addAll(buffer.toString()); // TODO drop once String is changed to CharSequence in UnicodeSet
            }
        }
    }
45952
public static StringBuilder replaceResources(StringBuilder sb, ResourceBundle reg, Map<String, Object> map, PropertyOwner propertyOwner)
    {
        return Utility.replaceResources(sb, reg, map, propertyOwner, false);
    }
234299
private synchronized void materializeWorkUnitAndDatasetStates(String datasetUrn) {
    if (!this.areWorkUnitStatesMaterialized) {
      try {
        CombinedWorkUnitAndDatasetState workUnitAndDatasetState =
            this.workUnitAndDatasetStateFunctional.getCombinedWorkUnitAndDatasetState(datasetUrn);
        this.previousWorkUnitStates = workUnitAndDatasetState.getPreviousWorkUnitStates();
        this.previousDatasetStatesByUrns =
            (Map<String, SourceState>) workUnitAndDatasetState.getPreviousDatasetStatesByUrns();
        this.areWorkUnitStatesMaterialized = true;
      } catch (Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
1273119
@InternalApi
  public void adapt(RowMutations mutations, MutationApi<?> mutationApi) {
    mutationAdapters.rowMutationsAdapter.adapt(mutations, mutationApi);
  }
482934
public void createDatabase(String database, Map<String, String> replacer) {

        m_errorLogging = true;
        executeSql(database, "create_db.sql", replacer, true);
    }
371673
@Override
  public void replace(List list, String resourceVersion) {
    lock.writeLock().lock();
    try {
      Set<String> keys = new HashSet<>();
      for (Object obj : list) {
        String key = this.keyOf(obj);
        keys.add(key);
        this.queueActionLocked(DeltaType.Sync, obj);
      }

      if (this.knownObjects == null) {
        for (Map.Entry<String, Deque<MutablePair<DeltaType, Object>>> entry :
            this.items.entrySet()) {
          if (keys.contains(entry.getKey())) {
            continue;
          }

          Object deletedObj = null;
          MutablePair<DeltaType, Object> delta = entry.getValue().peekLast(); // get newest
          if (delta != null) {
            deletedObj = delta.getRight();
          }
          this.queueActionLocked(
              DeltaType.Deleted, new DeletedFinalStateUnknown(entry.getKey(), deletedObj));
        }

        if (!this.populated) {
          this.populated = true;
          this.initialPopulationCount = list.size();
        }
        return;
      }

      // Detect deletions not already in the queue.
      List<String> knownKeys = this.knownObjects.listKeys();
      int queueDeletion = 0;
      for (String knownKey : knownKeys) {
        if (keys.contains(knownKey)) {
          continue;
        }

        Object deletedObj = this.knownObjects.getByKey(knownKey);
        if (deletedObj == null) {
          log.warn(
              "Key {} does not exist in known objects store, placing DeleteFinalStateUnknown marker without object",
              knownKey);
        }
        queueDeletion++;
        this.queueActionLocked(
            DeltaType.Deleted, new DeletedFinalStateUnknown<>(knownKey, deletedObj));
      }

      if (!this.populated) {
        this.populated = true;
        this.initialPopulationCount = list.size() + queueDeletion;
      }
    } finally {
      lock.writeLock().unlock();
    }
  }
1164491
public void initialize( List<Point> dataSet ) {
		bestFitPoints.clear();

		if( dataSet.size() > matchToInput.length ) {
			matchToInput = new int[ dataSet.size() ];
			bestMatchToInput = new int[ dataSet.size() ];
		}
	}