Migrate a DTM built with an old DTMManager to a new DTMManager.
After the migration, the new DTMManager will treat the DTM as
one that is built by itself.
This is used to support DTM sharing between multiple transformations.
@param mgr the DTMManager
960350
public void migrateTo(DTMManager mgr)
   {
     m_mgr = mgr;
     if(mgr instanceof DTMManagerDefault)
       m_mgrDefault=(DTMManagerDefault)mgr;     
   }
150168
function LALR_buildNewGrammar () {
        var self = this,
            newg = this.newg;

        this.states.forEach(function (state, i) {
            state.forEach(function (item) {
                if (item.dotPosition === 0) {
                    // new symbols are a combination of state and transition symbol
                    var symbol = i+":"+item.production.symbol;
                    self.terms_[symbol] = item.production.symbol;
                    newg.nterms_[symbol] = i;
                    if (!newg.nonterminals[symbol])
                        newg.nonterminals[symbol] = new Nonterminal(symbol);
                    var pathInfo = self.goPath(i, item.production.handle);
                    var p = new Production(symbol, pathInfo.path, newg.productions.length);
                    newg.productions.push(p);
                    newg.nonterminals[symbol].productions.push(p);

                    // store the transition that get's 'backed up to' after reduction on path
                    var handle = item.production.handle.join(' ');
                    var goes = self.states.item(pathInfo.endState).goes;
                    if (!goes[handle])
                        goes[handle] = [];
                    goes[handle].push(symbol);

                    //self.trace('new production:',p);
                }
            });
            if (state.inadequate)
                self.inadequateStates.push(i);
        });
    }
990472
public boolean migrate(Version targetVersion) {
	printRunHeader("MIGRATE");
	StopWatch stopWatch = new StopWatch();
	stopWatch.start();
	boolean success = false;
	try {
	    transform(targetVersion);
	    success = true;
	} catch (TransformationException | InvalidSequenceException e) {
	    e.printStackTrace(System.err);
	}
	stopWatch.stop();
	printRunFooter(success, stopWatch);
	return success;
    }
935909
public function migrateUp()
    {
        $this->builder->table(
            $this->table,
            function ($table) {
                $table->integer('referer_id')->unsigned()->nullable()->index();
            }
        );
    }
654369
@Inject
  public void setFreemarkerManager(FreemarkerManager mgr) {
    this.freemarkerManager = mgr;
    if (null != freemarkerManager) {
      Configuration old = freemarkerManager.getConfig();
      if (null != old) {
        config = (Configuration) freemarkerManager.getConfig().clone();
        config.setTemplateLoader(new HierarchicalTemplateLoader(this, config.getTemplateLoader()));
      } else {
        config = new Configuration(Configuration.VERSION_2_3_28);
        config.setTemplateLoader(new HierarchicalTemplateLoader(this, new BeangleClassTemplateLoader(null)));
      }
      // Disable freemarker localized lookup
      config.setLocalizedLookup(false);
      config.setEncoding(config.getLocale(), "UTF-8");
      config.setTagSyntax(Configuration.SQUARE_BRACKET_TAG_SYNTAX);
      // Cache one hour(7200s) and Strong cache
      config.setTemplateUpdateDelayMilliseconds(7200 * 1000);
      // config.setCacheStorage(new MruCacheStorage(100,250));
      config.setCacheStorage(new StrongCacheStorage());

      // Disable auto imports and includes
      config.setAutoImports(CollectUtils.newHashMap());
      config.setAutoIncludes(CollectUtils.newArrayList(0));
    }
  }
355732
public static void reproject( CoordinateReferenceSystem from, CoordinateReferenceSystem to, Object[] geometries )
            throws Exception {
        MathTransform mathTransform = CRS.findMathTransform(from, to);

        for( int i = 0; i < geometries.length; i++ ) {
            geometries[i] = JTS.transform((Geometry) geometries[i], mathTransform);
        }
    }
1004496
protected function doRefresh(Migrator $migrator)
    {
        // retreive installed versions
        $installed_migrations = $migrator->installedMigrationsByDesc();

        // downgrade
        foreach ($installed_migrations as $group => $migrations) {
            foreach ($migrations as $data) {
                $this->infoDowngrade($group, $data->version, $data->class);

                $migrator->doDowngrade($group, $data->version);
            }
        }

        // upgrade
        foreach ($migrator->migrationGroups() as $group) {
            foreach ($migrator->migrationVersions($group) as $version => $class) {
                $this->infoUpgrade($group, $version, $class);

                $migrator->doUpgrade($group, $version, $class);
            }
        }
    }
858831
public void setTransform(Matrix newTransform) {
    FLog.v(TAG, "setTransform");
    mActiveTransform.set(newTransform);
    onTransformChanged();
  }
1356985
public void moveHeaderParams(Map<String,Object> mapMessage, Map<String,Object> mapHeader)
    {
        for (int i = 0; i < m_rgstrHeaderParams.length; i++)
        {
            if (mapMessage.get(m_rgstrHeaderParams[i]) != null)
                if (mapHeader.get(m_rgstrHeaderParams[i]) == null)
                {
                    Object objValue = mapMessage.get(m_rgstrHeaderParams[i]);
                    mapMessage.remove(m_rgstrHeaderParams[i]);
                    mapHeader.put(m_rgstrHeaderParams[i], objValue);
                }
        }
    }
1151345
public void setMetricTransformations(java.util.Collection<MetricTransformation> metricTransformations) {
        if (metricTransformations == null) {
            this.metricTransformations = null;
            return;
        }

        this.metricTransformations = new com.amazonaws.internal.SdkInternalList<MetricTransformation>(metricTransformations);
    }
290375
def migrate(self) -> None:
        

        assert self.ormSessionCreator, "ormSessionCreator is not defined"

        connection = self._dbEngine.connect()
        isDbInitialised = self._dbEngine.dialect.has_table(
            connection, 'alembic_version',
            schema=self._metadata.schema)
        connection.close()

        if isDbInitialised or not self._enableCreateAll:
            self._doMigration(self._dbEngine)

        else:
            self._doCreateAll(self._dbEngine)

        if self._enableForeignKeys:
            self.checkForeignKeys(self._dbEngine)
610060
public boolean merge(ResourceMetadata other) {
        boolean modified = m_metrics.addAll(other.m_metrics);
        if (!modified) {
            modified = !m_attributes.equals(other.m_attributes);
        }
        m_attributes.putAll(other.m_attributes);
        return modified;
    }
127284
@Override
	public void clearCached(ICacheManager mgr) {
		Map<String, CacheEntry> moduleBuilds;
		synchronized (this) {
			moduleBuilds = _moduleBuilds;
			_moduleBuilds = null;
		}
		if (moduleBuilds != null) {
			for (Map.Entry<String, CacheEntry> entry : moduleBuilds.entrySet()) {
				entry.getValue().delete(mgr);
			}
			moduleBuilds.clear();
		}
	}
1311122
public function migrateDown()
    {
        try {
            $this->builder->table(
                $this->table,
                function ($table) {
                    $table->string('value')->change();
                }
            );
        } catch (\Exception $e) {
            dd($e->getMessage());
        }
    }
476001
synchronized public void prepareTransferMastership(int partitionId, int hostId) {
        // remove mastership for partition id, so when failure happen during the mastership transfer
        // this node can be elected as new master again.
        m_masterOfPartitions.remove(partitionId);

        if (exportLog.isDebugEnabled()) {
            exportLog.debug("Export stream masters on " + partitionId + " are going to migrate away");
        }
        ExportGeneration generation = m_generation.get();
        if (generation == null) {
            return;
        }
        generation.prepareTransferMastership(partitionId, hostId);
    }
613602
public static final void setAccessController(AccessController mgr)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "setAccessController", mgr);
        _accessController = mgr;
        if (tc.isEntryEnabled())
            Tr.exit(tc, "setAccessController");
    }
640091
protected void migrateProcessInstance(MigratingProcessInstance migratingProcessInstance) {
    MigratingActivityInstance rootActivityInstance = migratingProcessInstance.getRootInstance();

    MigratingProcessElementInstanceTopDownWalker walker = new MigratingProcessElementInstanceTopDownWalker(rootActivityInstance);

    walker.addPreVisitor(
        new MigratingActivityInstanceVisitor(
            executionBuilder.isSkipCustomListeners(),
            executionBuilder.isSkipIoMappings()));
    walker.addPreVisitor(new MigrationCompensationInstanceVisitor());

    walker.walkUntil();
  }