It changes source code from bottom to top, and it can change source code twice at the same time,
 So if there is an overlap between two actions, it removes the conflict actions and operate them in the next loop.
489032
def get_conflict_actions
      i = @actions.length - 1
      j = i - 1
      conflict_actions = []
      return if i < 0

      begin_pos = @actions[i].begin_pos
      while j > -1
        if begin_pos <= @actions[j].end_pos
          conflict_actions << @actions.delete_at(j)
        else
          i = j
          begin_pos = @actions[i].begin_pos
        end
        j -= 1
      end
      conflict_actions
    end
24373
def process_op(self, rc, nbytes, overlap):
        
        act = overlap.object
        overlap.object = None
        if act in self.tokens:
            ol, perform, complete = self.tokens[act]
            assert ol is overlap
            if rc == 0:
                ract = self.try_run_act(act, complete, rc, nbytes)
                if ract:
                    del self.tokens[act]
                    win32file.CancelIo(act.sock._fd.fileno())
                    return ract, act.coro
                else:
                    # operation hasn't completed yet (not enough data etc)
                    # read it in the iocp
                    self.request_generic(act, act.coro, perform, complete)


            else:
                #looks like we have a problem, forward it to the coroutine.

                # this needs some research: ERROR_NETNAME_DELETED, need to reopen
                #the accept sock ?! something like:
                #    warnings.warn("ERROR_NETNAME_DELETED: %r. Re-registering operation." % op)
                #    self.registered_ops[op] = self.run_iocp(op, coro)
                del self.tokens[act]
                win32file.CancelIo(act.sock._fd.fileno())
                return CoroutineException((
                    SocketError, SocketError(
                        (rc, "%s on %r" % (ctypes.FormatError(rc), act))
                    )
                )), act.coro
        else:
            import warnings
            warnings.warn("Unknown token %s" % act)
891578
private function detectNameConflicts(): void
  {
    // Get same method names from array
    list($sources_by_path, $sources_by_method) = $this->getDuplicates();

    // Add every not unique method name to myErrorFileNames
    foreach ($sources_by_path as $source)
    {
      $this->errorFilenames[] = $source['path_name'];
    }

    // Log the sources files with duplicate method names.
    foreach ($sources_by_method as $method => $sources)
    {
      $tmp = [];
      foreach ($sources as $source)
      {
        $tmp[] = $source['path_name'];
      }

      $this->io->error(sprintf("The following source files would result wrapper methods with equal name '%s'",
                               $method));
      $this->io->listing($tmp);
    }

    // Remove duplicates from mySources.
    foreach ($this->sources as $i => $source)
    {
      if (isset($sources_by_path[$source['path_name']]))
      {
        unset($this->sources[$i]);
      }
    }
  }
628668
function combineChangesets (changesets) {
  const actions = changesets.map((changeset) => changeset.apply)

  const combinedAction = function () {
    const args = arguments

    return actions.reduce((promise, action) => (
      promise.then(() => action.apply(null, args))
    ), Promise.resolve())
  }

  return createChangeset(combinedAction)
}
688084
def execute
      options = copy_move_options
      copy_options = @resource.copy_options options

      unless copy_options[:can_copy]
        return :precondition_failed if copy_options[:ancestor_exist]
        return :conflict
      end

      return :locked if copy_options[:locked]

      overwritten = @resource.copy options
      overwritten ? :no_content : :created
    end
296666
function(command) {
            var self    = this,
                control = null,
                output  = new mixitup.CommandMultimix(),
                i       = -1;

            self.callActions('beforeUpdateControls', arguments);

            // Sanitise to defaults

            if (command.filter) {
                output.filter = command.filter.selector;
            } else {
                output.filter = self.state.activeFilter.selector;
            }

            if (command.sort) {
                output.sort = self.buildSortString(command.sort);
            } else {
                output.sort = self.buildSortString(self.state.activeSort);
            }

            if (output.filter === self.config.selectors.target) {
                output.filter = 'all';
            }

            if (output.filter === '') {
                output.filter = 'none';
            }

            h.freeze(output);

            for (i = 0; control = self.controls[i]; i++) {
                control.update(output, self.toggleArray);
            }

            self.callActions('afterUpdateControls', arguments);
        }
776716
function (change) {
			if (this.compoundChange) {
				this.compoundChange.add(change);
			} else {
				var length = this.stack.length;
				this.stack.splice(this.index, length-this.index, change);
				this.index++;
				if (this.stack.length > this.size) {
					this.stack.shift();
					this.index--;
				}
			}
		}
635270
@Override
    public void sawOpcode(int seen) {
        boolean processed = false;
        Iterator<IfStatement> isi = ifStatements.iterator();
        while (isi.hasNext()) {
            IfStatement.Action action = isi.next().processOpcode(this, bugReporter, seen);
            if (action == IfStatement.Action.REMOVE_ACTION) {
                isi.remove();
            } else if (action == IfStatement.Action.PROCESSED_ACTION) {
                processed = true;
            }
        }

        if (!processed && OpcodeUtils.isALoad(seen)) {
            IfStatement is = new IfStatement(this, seen);
            ifStatements.add(is);
        }
    }
1217164
private static void moveMarkedWeakSources(JSModule weakModule, Iterable<CompilerInput> inputs) {
    checkNotNull(weakModule);
    ImmutableList<CompilerInput> allInputs = ImmutableList.copyOf(inputs);
    for (CompilerInput i : allInputs) {
      if (i.getSourceFile().isWeak()) {
        JSModule existingModule = i.getModule();
        if (existingModule == weakModule) {
          continue;
        }
        if (existingModule != null) {
          existingModule.remove(i);
        }
        weakModule.add(i);
      }
    }
  }
44360
protected void updateOverwriteExisting() {

        if (m_overwriteExisting != null) {
            boolean move = (m_dialogMode == DialogMode.move) || (m_actionCombo.getValue() == Action.move);
            if (move) {
                m_overwriteExisting.setValue(Boolean.FALSE);
                m_overwriteExisting.setVisible(false);
            } else {
                m_overwriteExisting.setVisible(true);
            }
        }
    }
625712
public void executeNext() {

        if (!m_idle) {
            if (m_actions.isEmpty()) {
                m_idle = true;
            } else {
                CmsValidationController action = m_actions.removeFirst();
                action.internalStartValidation();
            }
        } else {
            assert false; // this shouldn't happen
        }
    }
1195718
function(oThis) {
		var oControl = oThis.getControl();
		if (oControl) {
			PositionContainer.cleanUpControl(oControl);
			oControl.detachEvent("_change", onPropertyChanges, oThis);
		}
	}
447669
private void flushRule() {
        for ( SourceBuilder src : sourceBuilders ) {
            if ( src.hasValues() ) {
                switch ( src.getActionTypeCode() ) {
                    case CONDITION:
                        Condition cond = new Condition();
                        cond.setSnippet( src.getResult() );
                        _currentRule.addCondition( cond );
                        break;
                    case ACTION:
                        Consequence cons = new Consequence();
                        cons.setSnippet( src.getResult() );
                        _currentRule.addConsequence( cons );
                        break;
                    case METADATA:
                        _currentRule.addMetadata( src.getResult() );
                        break;
                }
                src.clearValues();
            }
        }

    }
733521
public boolean redo() {
    LOGGER.trace("redo, before, size: " + changes.size() + " pos: " + position.get()
        + " validPos: " + validPosition.get());
    Change nextChange = next();
    if (nextChange != null) {
      doWithoutListeners(nextChange.getSetting(), nextChange::redo);
      LOGGER.trace("redo, after, size: " + changes.size() + " pos: " + position.get()
          + " validPos: " + validPosition.get());
      return true;
    }
    return false;
  }
126765
@Override
    public void sawOpcode(int seen) {
        boolean reset = true;
        switch (state) { // TODO: Refactor this to use state pattern, not nested
                         // switches
            case SEEN_NOTHING:
                reset = sawOpcodeAfterNothing(seen);
            break;

            case SEEN_ALOAD:
                reset = sawOpcodeAfterLoad(seen);
            break;

            case SEEN_GETFIELD:
                reset = sawOpcodeAfterGetField(seen);
            break;

            case SEEN_DUAL_LOADS:
                reset = sawOpcodeAfterDualLoads(seen);
            break;

            case SEEN_INVOKEVIRTUAL:
                if (seen == Const.INVOKEVIRTUAL) {
                    checkForSGSU();
                }
            break;
        }

        if (reset) {
            beanReference1 = null;
            beanReference2 = null;
            propType = null;
            propName = null;
            sawField = false;
            state = State.SEEN_NOTHING;
        }
    }
424160
def detect_event_conflict!(event_name, method_name = event_name)
      if method_already_implemented?(method_name)
        raise FiniteMachine::AlreadyDefinedError, EVENT_CONFLICT_MESSAGE % {
          name: event_name,
          type: :instance,
          method: method_name,
          source: 'FiniteMachine'
        }
      end
    end
1113372
protected void doHandleChanged() {
		// If there is an associated action, execute it
		if (getActionOnChange() != null) {
			final ActionEvent event = new ActionEvent(this, getActionCommand(), getActionObject());
			final boolean isCAT = isCurrentAjaxTrigger();
			Runnable later = new Runnable() {
				@Override
				public void run() {
					getActionOnChange().execute(event);
					if (isCAT && UIContextHolder.getCurrent().getFocussed() == null) {
						setFocussed();
					}
				}
			};

			invokeLater(later);
		} else if (AjaxHelper.isCurrentAjaxTrigger(this) && UIContextHolder.getCurrent().getFocussed() == null) {
			setFocussed();
		}
	}