Moves all of the declaration statements that can move to their best possible chunk location.
194602
private void moveGlobalSymbols(Collection<GlobalSymbol> globalSymbols) {
    for (GlobalSymbolCycle globalSymbolCycle :
        new OrderAndCombineGlobalSymbols(globalSymbols).orderAndCombine()) {
      // Symbols whose declarations refer to each other must be grouped together and their
      // declaration statements moved together.
      globalSymbolCycle.moveDeclarationStatements();
    }
  }
772682
def remove_declaration(self, decl):
        

        del self.declarations[self.declarations.index(decl)]
        decl.cache.reset()
491549
def move_committees(src, dest):
    
    comm, sub_comm = import_committees(src)
    save_committees(comm, dest)
    save_subcommittees(comm, dest)
1315214
private function moveFiles()
    {
        // Ensure we have the file permissions not in cache as new files were installed.
        clearstatcache();
        // Now move all the files over.
        $destinationDir = $this->file->get(self::SETTING_DESTINATION_DIR);
        $ioHandler      = $this->getIO();
        $logging        = $ioHandler->isVeryVerbose();
        $this->folders  = [];
        foreach (Finder::create()->in($this->tempDir)->ignoreDotFiles(false)->ignoreVCS(false) as $file) {
            $this->moveFile($file, $destinationDir, $logging, $ioHandler);
        }

        foreach (array_reverse($this->folders) as $folder) {
            if ($logging) {
                $ioHandler->write(sprintf('remove directory %s', $folder));
            }
            rmdir($folder);
        }
    }
874567
private void moveNextResults(boolean clearPreviousResults) {
        if (clearPreviousResults) {
            allResults.clear();
        }
        allResults.addAll(nextResults);
        nextResults.clear();
    }
663923
def move(self):
        """"""
        if not os.path.isdir(self.outdir):
            os.makedirs(self.outdir)
        shutil.move(self.tmpdir, os.path.join(self.outdir, self.name))
494312
private void movePrototypeDotMethodAssignment(Node destParent, Node functionNode) {
    checkState(functionNode.isFunction(), functionNode);
    Node assignNode = functionNode.getParent();
    checkState(assignNode.isAssign() && functionNode.isSecondChildOf(assignNode), assignNode);
    Node definitionStatement = assignNode.getParent();
    checkState(definitionStatement.isExprResult(), assignNode);

    if (noStubFunctions) {
      // Remove the definition statement from its current location
      Node assignStatementParent = definitionStatement.getParent();
      definitionStatement.detach();
      compiler.reportChangeToEnclosingScope(assignStatementParent);

      // Prepend definition to new chunk
      // Foo.prototype.propName = function() {};
      destParent.addChildToFront(definitionStatement);
      compiler.reportChangeToEnclosingScope(destParent);
    } else {
      int stubId = idGenerator.newId();

      // replace function definition with temporary placeholder so we can clone the whole
      // assignment statement without cloning the function definition itself.
      Node originalDefinitionPlaceholder = astFactory.createEmpty();
      functionNode.replaceWith(originalDefinitionPlaceholder);
      Node newDefinitionStatement = definitionStatement.cloneTree();
      Node newDefinitionPlaceholder =
          newDefinitionStatement // EXPR_RESULT
              .getOnlyChild() // ASSIGN
              .getLastChild(); // EMPTY RHS node

      // convert original assignment statement to
      // owner.prototype.propName = JSCompiler_stubMethod(0);
      Node stubCall = createStubCall(functionNode, stubId);
      originalDefinitionPlaceholder.replaceWith(stubCall);
      compiler.reportChangeToEnclosingScope(definitionStatement);

      // Prepend new definition to new chunk
      // Foo.prototype.propName = JSCompiler_unstubMethod(0, function() {});
      Node unstubCall = createUnstubCall(functionNode, stubId);
      newDefinitionPlaceholder.replaceWith(unstubCall);
      destParent.addChildToFront(newDefinitionStatement);
      compiler.reportChangeToEnclosingScope(destParent);
    }
  }
88944
protected void moveAllLeftToRight() {
        int sz = dataModel.getSize();
        int[] selected = new int[sz];
        for (int i = 0; i < sz; i++) {
            selected[i] = i;
        }
        helperList.setSelectedIndices(selected);
        update();
    }
912201
protected void configure(Statement statement) {
        // for thread safety, grab local copy
        Closure configureStatement = this.configureStatement;
        if (configureStatement != null) {
            configureStatement.call(statement);
        }
    }
815403
private void resiftAffectedTransitions(final Set<ADTNode<ADTState<I, O>, I, O>> states,
                                           final ADTNode<ADTState<I, O>, I, O> finalizedADS) {

        for (final ADTNode<ADTState<I, O>, I, O> state : states) {

            final List<ADTTransition<I, O>> transitionsToRefine = state.getHypothesisState()
                                                                       .getIncomingTransitions()
                                                                       .stream()
                                                                       .filter(x -> !x.isSpanningTreeEdge())
                                                                       .collect(Collectors.toList());

            for (final ADTTransition<I, O> trans : transitionsToRefine) {
                trans.setTarget(null);
                trans.setSiftNode(finalizedADS);
                this.openTransitions.add(trans);
            }
        }
    }
412858
@Override
    public void move(final Path source, final Path target, final CopyOption... options) throws IOException {

        // Precondition checks
        if (source == null) {
            throw new IllegalArgumentException("source must be specified");
        }
        if (target == null) {
            throw new IllegalArgumentException("target must be specified");
        }

        // Source exists?
        if (!Files.exists(source, new LinkOption[] {})) {
            throw new IllegalArgumentException("Source file doesn't exist: " + source.toString());
        }

        // If equal, NOOP
        if (source == target) {
            return;
        }

        final Archive<?> archive = this.getArchive(target);
        final Node node = archive.get(target.toString());
        // Copying to something already present?
        if (node != null) {
            final Asset asset = node.getAsset();
            // Directory
            if (asset == null) {
                // Not empty
                if (node.getChildren().size() > 0) {
                    throw new DirectoryNotEmptyException("Cannot move to non-empty directory: " + target.toString());
                }
            }
        }

        // Move
        archive.move(source.toString(), target.toString());
    }
513818
function (delta) {
            edits.push.apply(edits, delta.edits);
            moves.push.apply(moves, delta.moves);
            queue.push.apply(queue, delta.newElements);
        }
668149
def move(self, place, distance = 1):
        """"""
        for d in range(distance):
            self.stream.write(self._get_cap('move '+place))
        self.flush()
524877
protected void moveRightToLeft() {
        Object[] chosenSelectedValues = chosenList.getSelectedValues();
        int nChosenSelected = chosenSelectedValues.length;
        int[] chosenSelected = new int[nChosenSelected];

        if (nChosenSelected == 0) {
            return; // Nothing to move
        }

        // Get our current selection
        int[] currentSelected = helperList.getSelectedIndices();
        int nCurrentSelected = currentSelected.length;

        // Fill the chosenSelected array with the indices of the selected chosen
        // items
        for (int i = 0; i < nChosenSelected; i++) {
            chosenSelected[i] = indexOf(chosenSelectedValues[i]);
        }

        // Construct the new selected indices. Loop through the current list
        // and compare to the head of the chosen list. If not equal, then add
        // to the new list. If equal, skip it and bump the head pointer on the
        // chosen list.

        int newSelection[] = new int[nCurrentSelected - nChosenSelected];
        int newSelPos = 0;
        int chosenPos = 0;

        for (int i = 0; i < nCurrentSelected; i++) {
            int currentIdx = currentSelected[i];
            if (chosenPos < nChosenSelected && currentIdx == chosenSelected[chosenPos]) {
                chosenPos += 1;
            } else {
                newSelection[newSelPos++] = currentIdx;
            }
        }

        // Install the new selection
        helperList.setSelectedIndices(newSelection);
        update();
    }
664698
private void moveAtFirst(int n_from) {
		int eT = elements[0];
		int eF = elements[n_from];
		positions[eT] = -1;
		positions[eF] = 0;
		elements[0] = eF;
		elements[n_from] = -1;
	}
1027370
def _move_stream_endpoint(coordinator, position):
    """"""
    # 0) Everything will be rebuilt from DescribeStream.
    stream_arn = coordinator.stream_arn
    coordinator.roots.clear()
    coordinator.active.clear()
    coordinator.buffer.clear()

    # 1) Build a Dict[str, Shard] of the current Stream from a DescribeStream call
    current_shards = coordinator.session.describe_stream(stream_arn=stream_arn)["Shards"]
    current_shards = unpack_shards(current_shards, stream_arn, coordinator.session)

    # 2) Roots are any shards without parents.
    coordinator.roots.extend(shard for shard in current_shards.values() if not shard.parent)

    # 3.0) Stream trim_horizon is the combined trim_horizon of all roots.
    if position == "trim_horizon":
        for shard in coordinator.roots:
            shard.jump_to(iterator_type="trim_horizon")
        coordinator.active.extend(coordinator.roots)
    # 3.1) Stream latest is the combined latest of all shards without children.
    else:
        for root in coordinator.roots:
            for shard in root.walk_tree():
                if not shard.children:
                    shard.jump_to(iterator_type="latest")
                    coordinator.active.append(shard)
1156124
private void moveTaskOutputs(TaskAttemptContext context,
                               FileSystem fs,
                               Path jobOutputDir,
                               Path taskOutput) 
  throws IOException {
    TaskAttemptID attemptId = context.getTaskAttemptID();
    context.progress();
    if (fs.isFile(taskOutput)) {
      Path finalOutputPath = getFinalPath(jobOutputDir, taskOutput, 
                                          workPath);
      if (!fs.rename(taskOutput, finalOutputPath)) {
        if (!fs.delete(finalOutputPath, true)) {
          throw new IOException("Failed to delete earlier output of task: " + 
                                 attemptId);
        }
        if (!fs.rename(taskOutput, finalOutputPath)) {
          throw new IOException("Failed to save output of task: " + 
        		  attemptId);
        }
      }
      LOG.debug("Moved " + taskOutput + " to " + finalOutputPath);
    } else if(fs.getFileStatus(taskOutput).isDir()) {
      FileStatus[] paths = fs.listStatus(taskOutput);
      Path finalOutputPath = getFinalPath(jobOutputDir, taskOutput, workPath);
      fs.mkdirs(finalOutputPath);
      if (paths != null) {
        for (FileStatus path : paths) {
          moveTaskOutputs(context, fs, jobOutputDir, path.getPath());
        }
      }
    }
  }