Clear the module state. This is mainly for testing purposes.
513526
def reset ():
    
    global __all_attributes, __all_features, __implicit_features, __composite_properties
    global __subfeature_from_value, __all_top_features, __free_features
    global __all_subfeatures

    # sets the default value of False for each valid attribute
    for attr in VALID_ATTRIBUTES:
        setattr(Feature, attr.replace("-", "_"), False)

    # A map containing all features. The key is the feature name.
    # The value is an instance of Feature class.
    __all_features = {}

    # All non-subfeatures.
    __all_top_features = []

    # Maps valus to the corresponding implicit feature
    __implicit_features = {}

    # A map containing all composite properties. The key is a Property instance,
    # and the value is a list of Property instances
    __composite_properties = {}

    # Maps a value to the corresponding subfeature name.
    __subfeature_from_value = {}

    # All free features
    __free_features = []

    __all_subfeatures = []
227875
public void clear() {
        modCount++;

        // clear to let GC do its work
        for (int i = 0; i < size; i++)
            elementData[i] = null;

        size = 0;
    }
1168501
def del_module(self, module):
        """"""
        rev = util.get_latest_revision(module)
        del self.modules[(module.arg, rev)]
291442
def clear(self):
    
    self.__init__(size=self.size, alpha=self.alpha, clock=self.clock)
1283476
public void clear ()
    {
        _modCount++;

        // abandon all of our hash chains (the joy of garbage collection)
        for (int i = 0; i < _buckets.length; i++) {
            _buckets[i] = null;
        }
        // zero out our size
        _size = 0;
    }
1041381
def clear(self):
        """"""
        super(LazyConfig, self).clear()
        self._lazy_suffix = []
        self._lazy_prefix = []
1311932
public function clear($module=''){
        $file = Config::getx('path_temp').$module.DS.'_router.php';
        if(is_file($file)) {
            unlink($file);
        }
    }
290745
public void clear()
  {
    _nullValue = NULL;
    
    for (int i = 0; i < _values.length; i++) {
      _keys[i] = null;
      _flags[i] = 0;
      _values[i] = 0;
    }
    
    _size = 0;
  }
450830
@Override
    public void clear() {
        try {
            warnUnusedOptions();

            if (clean == null || clean.getValue() == Boolean.TRUE) {
                for (ExamSystem sys : subsystems) {
                    sys.clear();
                }
                FileUtils.delete(cache.getCanonicalFile());
            }
        }
        catch (IOException e) {
            // LOG.info("Clearing " + this.toString() + " failed." ,e);
        }
    }
364544
def clear_modules():
        
        # next lets force remove any inasafe related modules
        modules = []
        for module in sys.modules:
            if 'inasafe' in module:
                # Check if it is really one of our modules i.e. exists in the
                # plugin directory
                tokens = module.split('.')
                path = ''
                for myToken in tokens:
                    path += os.path.sep + myToken
                parent = os.path.abspath(os.path.join(
                    __file__, os.path.pardir, os.path.pardir))
                full_path = os.path.join(parent, path + '.py')
                if os.path.exists(os.path.abspath(full_path)):
                    LOGGER.debug('Removing: %s' % module)
                    modules.append(module)
        for module in modules:
            del (sys.modules[module])
        for module in sys.modules:
            if 'inasafe' in module:
                print(module)

        # Lets also clean up all the path additions that were made
        package_path = os.path.abspath(os.path.join(
            os.path.dirname(__file__), os.path.pardir))
        LOGGER.debug('Path to remove: %s' % package_path)
        # We use a list comprehension to ensure duplicate entries are removed
        LOGGER.debug(sys.path)
        sys.path = [y for y in sys.path if package_path not in y]
        LOGGER.debug(sys.path)
79757
def stop_all(self):
        
        logger.info('Shutting down modules...')
        # Ask internal to quit if they can
        for instance in self.get_internal_instances():
            if hasattr(instance, 'quit') and isinstance(instance.quit, collections.Callable):
                instance.quit()

        self.clear_instances([instance for instance in self.instances if instance.is_external])
438342
def clear_globals_reload_modules(self):
        """"""

        self.code_array.clear_globals()
        self.code_array.reload_modules()

        # Clear result cache
        self.code_array.result_cache.clear()
1150263
def clear(self):
        """"""

        if self.default_value is None:
            self.current_value = bytearray()
        else:
            self.current_value = bytearray(self.default_value)
689499
def clear(self):
        """"""
        if not self._clear:
            self.lib._jit_clear_state(self.state)
            self._clear = True
177751
public void clear() {
        _file_mode = false;
        _write_pos = 0;
        _read_pos = 0;
        _window_low = 0;
        _window_high = _window_size;
        _file_high = 0;
        _mark_pos = 0;
    }
1015542
@Override
    public void clear() {
        this.root = null;
        this.first = null;
        this.last = null;
        this.size = 0;
        this.modCount++;
    }
985024
def clear(self):
        
        self.prop_dt_map = dict()
        self.prop_data = dict()
        self.rev_lookup = defaultdict(set)