This method could go somewhere else.
427400
public function optionsFromEnumColumn($model_name, $column_name, array $extra_options = [])
    {
        $options = [];
        foreach ($model_name::table()->enumValues($column_name) as $val) {
            $options[$this->humanize($val)] = $val;
        }
        
        if ($extra_options) {
            $options = array_merge($extra_options, $options);
        }
        
        return $options;
    }
959391
public SourceLocation extend(SourceLocation other) {
    checkState(
        filePath.equals(other.filePath),
        "Mismatched files paths: %s and %s",
        filePath,
        other.filePath);
    return new SourceLocation(filePath, begin, other.end);
  }
832426
function move(node, stayWithin, directionIsNext) {
  if (directionIsNext) {
    return NodeTraversal.next(node, stayWithin);
  } else {
    if (node === stayWithin) {
      return null;
    }
    return NodeTraversal.previous(node, null);
  }
}
848198
public void didLeavePlace ()
    {
        // unsubscribe from our old place object
        if (_subber != null) {
            _subber.unsubscribe(_ctx.getDObjectManager());
            _subber = null;
        }

        // let the old controller know that things are going away
        if (_plobj != null && _controller != null) {
            try {
                _controller.didLeavePlace(_plobj);
            } catch (Exception e) {
                log.warning("Place controller choked in didLeavePlace", "plobj", _plobj, e);
            }
        }

        // and clear out other bits
        _plobj = null;
        _controller = null;
        _placeId = -1;
    }
941455
def do_down(self, arg):
        """"""
        print "running down migration"
        self.manager.run_one(arg, Direction.DOWN)
410241
def retract(self, safety_margin=10):
        '''
        
        '''
        self.previous_placeable = None  # it is no longer inside a placeable
        self.robot.poses = self.instrument_mover.fast_home(
            self.robot.poses, safety_margin)
        return self
295170
public void subtractCosts(Costs other) {
		if (this.networkCost != UNKNOWN && other.networkCost != UNKNOWN) {
			this.networkCost -= other.networkCost;
			if (this.networkCost < 0) {
				throw new IllegalArgumentException("Cannot subtract more cost then there is.");
			}
		}
		if (this.diskCost != UNKNOWN && other.diskCost != UNKNOWN) {
			this.diskCost -= other.diskCost;
			if (this.diskCost < 0) {
				throw new IllegalArgumentException("Cannot subtract more cost then there is.");
			}
		}
		if (this.cpuCost != UNKNOWN && other.cpuCost != UNKNOWN) {
			this.cpuCost -= other.cpuCost;
			if (this.cpuCost < 0) {
				throw new IllegalArgumentException("Cannot subtract more cost then there is.");
			}
		}
		
		// ---------- relative costs ----------
		
		this.heuristicNetworkCost -= other.heuristicNetworkCost;
		if (this.heuristicNetworkCost < 0) {
			throw new IllegalArgumentException("Cannot subtract more cost then there is.");
		}
		this.heuristicDiskCost -= other.heuristicDiskCost;
		if (this.heuristicDiskCost < 0) {
			throw new IllegalArgumentException("Cannot subtract more cost then there is.");
		}
		this.heuristicCpuCost -= other.heuristicCpuCost;
		if (this.heuristicCpuCost < 0) {
			throw new IllegalArgumentException("Cannot subtract more cost then there is.");
		}
	}
408209
final void maybePropagateCancellation(@Nullable Future<?> related) {
    if (related != null & isCancelled()) {
      related.cancel(wasInterrupted());
    }
  }
60730
public static <T> Option<T> some(T t) {
    return new Option.Some<T>(t);
  }
525826
function(fn, excludeThis) {
            var children = this.getChildren();
            for (var i = 0; i < children.length; i++) {
                children[i].postTraverse(fn);
            }
            if (!excludeThis) fn(this);
        }
782522
public void copyFrom(BlockType other) {
        this.isValid = other.isValid;
        this.isTop = other.isTop;
        if (isValid) {
            this.depth = other.depth;
            this.clear();
            this.or(other);
        }
    }
1370580
@Requires("contextLocal >= 0")
  protected void leaveContractedMethod() {
    Label skip = new Label();
    loadLocal(checkInvariantsLocal);
    ifZCmp(EQ, skip);

    loadLocal(contextLocal);
    if (statik) {
      loadThisClass();
    } else {
      loadThis();
    }
    invokeVirtual(CONTRACT_CONTEXT_TYPE, LEAVE_METHOD);

    mark(skip);
  }
1186111
def coerce(other)
      if other.is_a? InternalComplex
        return other, self
      elsif other.is_a? Complex
        return InternalComplex.new( other.real, other.imag ), self
      else
        return InternalComplex.new( other, 0 ), self
      end
    end
116653
function move(fs, a, b, method, cb) {
    var parentA = path.dirname(a);
    var parentB = path.dirname(b);
    var nameA = path.basename(a);
    var nameB = path.basename(b)

    fs.metadata(a)
    .then(function(metadata) {
        return this.metadata(b)
            .then(function(metadata) {
                throw fs.error('EEXIST', 'Cannot move because target path already exist: ' + b);
            }, function(err) {
                if (err.code === 'ENOENT') {
                    return this.mkdir(parentB);
                } else {
                    throw err;
                }
            });
    })
    .then(function() {
        return this._promise(method, a, b);
    })
    .done(function() {
        cb();
    }, function(err) {
        cb(err);
    });
}
967013
private static <I, D> void moveIncoming(AbstractBaseDTNode<I, D> newNode,
                                            AbstractBaseDTNode<I, D> oldNode,
                                            D label) {
        newNode.getIncoming().insertAllIncoming(oldNode.getSplitData().getIncoming(label));
    }
931523
def retract(self):
        """"""
        if lib.EnvRetract(self._env, self._fact) != 1:
            raise CLIPSError(self._env)
896793
def move(self):
        """"""
        k = random.choice(self.keys)
        multiplier = random.choice((0.95, 1.05))

        invalid_key = True
        while invalid_key:
            # make sure bias doesn't exceed 1.0
            if k == "bias":
                if self.state[k] > 0.909:
                    k = random.choice(self.keys)
                    continue

            invalid_key = False

        newval = self.state[k] * multiplier
        self.state[k] = newval