This cleans up a particular behavior and adds it to the definition
353712
function(definition, behavior, value) {
	if(behavior === "enumerable") {
		// treat enumerable like serialize
		definition.serialize = !!value;
	}
	else if(behavior === "type") {
		var behaviorDef = value;
		if(typeof behaviorDef === "string") {
			behaviorDef = define.types[behaviorDef];
			if(typeof behaviorDef === "object" && !isDefineType(behaviorDef)) {
				assign(definition, behaviorDef);
				behaviorDef = behaviorDef[behavior];
			}
		}
		if (typeof behaviorDef !== 'undefined') {
			definition[behavior] = behaviorDef;
		}
	}
	else {
		definition[behavior] = value;
	}
}
429247
def remove_behaviour(self, behaviour):
        
        if not self.has_behaviour(behaviour):
            raise ValueError("This behaviour is not registered")
        index = self.behaviours.index(behaviour)
        self.behaviours[index].kill()
        self.behaviours.pop(index)
1270619
function removeThis()
    {
        $workflowParameters = $this->attribute( 'parameter_list' );
        $cleanupList = array();

        $db = eZDB::instance();
        $db->begin();
        if ( isset( $workflowParameters['cleanup_list'] ) && is_array( $workflowParameters['cleanup_list'] ) )
        {
            $cleanupList = $workflowParameters['cleanup_list'];
            foreach ( $cleanupList as $workflowEventID )
            {
                $workflowEvent = eZWorkflowEvent::fetch( $workflowEventID );
                $workflowType = $workflowEvent->eventType();
                $workflowType->cleanup( $this, eZWorkflowEvent::fetch( $workflowEventID ) );
            }
        }
        eZPersistentObject::removeObject( eZWorkflowProcess::definition(), array( 'id' => $this->attribute( 'id' ) ) );
        $db->commit();
    }
1260127
def _cleanup(self):
        '''
        
        '''
        self._declare_cb = None
        self._bind_cb = None
        self._unbind_cb = None
        self._delete_cb = None
        self._purge_cb = None
        super(QueueClass, self)._cleanup()
69453
def clean(self):
        
        if self._initialized:
            logger.info("brace yourselves, removing %r", self.path)
            shutil.rmtree(self.path)
149907
function() {
    this._super();

    if (!this._options.implicit) {
      this.removeOverride('<plural>');
      this.removeOverride('<singular>Objects');
      this.removeOverride('add<Singular>');
      this.removeOverride('add<Plural>');
      this.removeOverride('remove<Singular>');
      this.removeOverride('remove<Plural>');
      this.removeOverride('clear<Plural>');

      this.overrideProperty('<singular>', 'item', 'set');
      this.addHelper('get<Singular>', 'item');
      this.addHelper('set<Singular>', 'set');
      this.addHelper('fetch<Singular>', 'fetch');
    }
  }
1224776
private void makeIncoming() {
        if (stays == null && move == null) {
            for (BitSet in : ins) {
                in.clear();
            }
            stays = new BitSet();
            move = new BitSet();
            for (int i = 0; i < hosts.length; i++) {
                if (hosts[i] != null && hosts[i].isInstantiated()) {
                    int newPos = hosts[i].getValue();
                    if (oldPos[i] != -1 && newPos != oldPos[i]) {
                        //The VM has move
                        ins[newPos].set(i);
                        move.set(i);
                    } else if (newPos == oldPos[i]) {
                        stays.set(i);
                    }
                }
            }
        }
    }
1305758
public void cleanup() {
    htDictionary.clear();
    memoryEstimate.decrementTotalMemory(byteArray.getSizeInBytes());
    memoryEstimate.decrementTotalMemory(getSizeOfIntArrays());
    memoryEstimate.decrementDictionaryMemory(byteArray.size());
  }
868535
public void cleanup() {
    keys.cleanup();
    counts.cleanup();
    dictionary.cleanup();
    // Decrement the dictionary memory by the total size of all the elements
    memoryEstimate.decrementDictionaryMemory(SizeOf.SIZE_OF_LONG * numElements);
  }
919395
function clean(done) {
	var del = require('del');
	del(cfg.destination).then(function () {
		if (typeof done === 'function') done();
		else process.exit();
	});
}
113510
def modify(self, sort=None, purge=False, done=None, undone=None):
        
        self.model.modifyInPlace(
            sort=self._getPattern(sort),
            purge=purge,
            done=self._getDone(done, undone)
        )
980466
private void refineAction(final Action action, final FilterKey key) {
        if (key.value != null && bindingMap != null && !bindingMap.isEmpty()) {
            final Map<String, Set<Element>> schemeMap = bindingMap.get(key.attribute);
            if (schemeMap != null && !schemeMap.isEmpty()) {
                for (final Set<Element> submap: schemeMap.values()) {
                    for (final Element e: submap) {
                        final Element subRoot = searchForKey(e, key.value);
                        if (subRoot != null) {
                            insertAction(subRoot, key.attribute, action);
                        }
                    }
                }
            }
        }
    }
51737
def enhance_method(method, callbacks)
      _method = (PREFIX + method.to_s).to_sym
      alias_method _method, method

      self.send(:define_method, method) do |*args, &blk|
        [callbacks, _method].flatten.each do |callback|
          break unless self.send(callback, *args, &blk)
        end
      end
    end
1061042
protected function tearDown(): void
    {
        $this->resetDocCommentPos();

        $this->hasReturnType = null;
        $this->functionName = null;
        $this->typesForFix = null;
    }
1043914
public void addBehavior(String behaviorId, String behaviorClass)
    {
        Application application = getMyfacesApplicationInstance();
        if (application != null)
        {
            application.addBehavior(behaviorId, behaviorClass);
            return;
        }
        throw new UnsupportedOperationException();
    }
478469
public function detachBehaviors()
    {
        $this->ensureBehaviors();
        foreach ($this->__behaviors__ as $name => $behavior) {
            $this->detachBehavior($name);
        }
    }
404887
function() {
            var args = slice.call(arguments);
            args.unshift(this);
            return _.extend.apply(this, args);
        }