Only used in tests, should be removed.
188469
public long sizeInBytes() throws IOException {
        long memoryBlockUsage = 0;
        for (StreamBlock b : m_memoryDeque) {
            //Use only total size, but throw in the USO
            //to make book keeping consistent when flushed to disk
            //Also dont count persisted blocks.
            memoryBlockUsage += b.totalSize();
        }
        //Subtract USO from on disk size
        return memoryBlockUsage + m_reader.sizeInBytes() - (StreamBlock.HEADER_SIZE * m_reader.getNumObjects());
    }
1182147
def remove_property(xml_root, partial_name):
    """"""
    if xml_root.tag in ("testsuites", "testcases", "requirements"):
        properties = xml_root.find("properties")
        remove_properties = []
        for prop in properties:
            prop_name = prop.get("name", "")
            if partial_name in prop_name:
                remove_properties.append(prop)
        for rem_prop in remove_properties:
            properties.remove(rem_prop)
    else:
        raise Dump2PolarionException(_NOT_EXPECTED_FORMAT_MSG)
612750
def close_dut(self, use_prepare=True):
        
        if not self.stopped:
            self.logger.debug("Close '%s' connection" % self.dut_name, extra={'type': '<->'})
            if use_prepare:
                try:
                    self.prepare_connection_close()
                except TestStepFail:
                    # We can ignore this for dead Duts, just continue with cleanup
                    pass
            self.stopped = True
            Dut._dutlist.remove(self)
            # Remove myself from signalled dut list, if I'm still there
            if Dut._signalled_duts and Dut._signalled_duts.count(self):
                try:
                    Dut._signalled_duts.remove(self)
                except ValueError:
                    pass

            try:
                if not Dut._dutlist:
                    Dut._run = False
                    Dut._sem.release()
                    Dut._th.join()
                    del Dut._th
                    Dut._th = None
            except AttributeError:
                pass
881066
def delete(self):
        """"""
        magic_identifier = unquote(self.get_id().identifier)
        orig_identifier = magic_identifier.split('?')[0]
        collection = JSONClientValidated('assessment_authoring',
                                         collection='AssessmentPart',
                                         runtime=self.my_osid_object._runtime)
        collection.delete_one({'_id': ObjectId(orig_identifier)})
729519
private void tearDownShiro()
  {
    try
    {
      SecurityManager securityManager = SecurityUtils.getSecurityManager();

      LifecycleUtils.destroy(securityManager);
      ThreadContext.unbindSecurityManager();
      ThreadContext.unbindSubject();
      ThreadContext.remove();
    }
    catch (UnavailableSecurityManagerException e)
    {

      // we don't care about this when cleaning up the test environment
      // (for example, maybe the subclass is a unit test and it didn't
      // need a SecurityManager instance because it was using only mock Subject instances)
    }

    SecurityUtils.setSecurityManager(null);
  }
1178104
function without(list, test, removedFn) {
 
   return withoutInner(list, removedFn || noop);
 
   function withoutInner(subList, removedFn) {
      return subList  
         ?  ( test(head(subList)) 
                  ? (removedFn(head(subList)), tail(subList)) 
                  : cons(head(subList), withoutInner(tail(subList), removedFn))
            )
         : emptyList
         ;
   }               
}
442036
protected void eliminate()
    {
        int count = end-begin;
        int mod = Math.floorMod(begin, size);
        while (count > 0 && isRemovable(mod))
        {
            remove(mod);
            begin++;
            count--;
            mod = Math.floorMod(begin, size);
        }
    }
55285
public static void remove() {

        final String current = System.getProperties().getProperty(HANDLER_PKGS, "");

        // Only one
        if (current.equals(PKG)) {
            System.getProperties().put(HANDLER_PKGS, "");
            return;
        }

        // Middle
        String token = "|" + PKG + "|";
        int idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(0, idx) + "|" + current.substring(idx + token.length());
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

        // Beginning
        token = PKG + "|";
        idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(idx + token.length());
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

        // End
        token = "|" + PKG;
        idx = current.indexOf(token);
        if (idx > -1) {
            final String removed = current.substring(0, idx);
            System.getProperties().put(HANDLER_PKGS, removed);
            return;
        }

    }
234738
function only( testName, callback ) {
	var newTest;

	if ( focused )  { return; }

	QUnit.config.queue.length = 0;
	focused = true;

	newTest = new Test( {
		testName: testName,
		callback: callback
	} );

	newTest.queue();
}
572612
public synchronized void removeLeastUsedElements()
    {    
        int rows = this.removePercent / 100 *  this.length;
        rows     = rows == 0 ? 1 : rows;
        
        while(rows > 0 && this.length > 0) {
            // remove the last element
            Entry<E, T> entry = this.tail.prev;
            
            this.tail.prev = entry.prev;
            entry.prev.next = this.tail;
            map.remove(entry.key);
            this.length--;
            rows--;
        }
    }
1109275
def clear_on_run(self, prefix="Running Tests:"):
        """"""
        if platform.system() == 'Windows':
            os.system('cls')
        else:
            os.system('clear')
        if prefix:
            print(prefix)
1283776
public void not() {
        IntBitSet tmp;

        tmp = new IntBitSet();
        tmp.addRange(0, used - 1);
        tmp.removeAll(ends);
        ends = tmp;
    }
458329
public void free()
    {
        if (this.getContentPane().getComponentCount() > 0)
            if (this.getContentPane().getComponent(0) instanceof BaseApplet)
                ((BaseApplet)this.getContentPane().getComponent(0)).free();
        this.dispose();
    }
96142
function (partStatistics) {
        this.count += partStatistics.count;
        this.tested += partStatistics.tested;
        this.ignored += partStatistics.ignored;
    }
111376
public void dispose(){
        classAnalysisMap.clear();
        classAnalysisEngineMap.clear();
        analysisLocals.clear();
        databaseFactoryMap.clear();
        databaseMap.clear();
        methodAnalysisEngineMap.clear();
    }
1166208
void removeAll(final boolean mark) {
        if (mark) {
            AbstractInsnNode insn = first;
            while (insn != null) {
                AbstractInsnNode next = insn.next;
                insn.index = -1; // insn no longer belongs to an InsnList
                insn.prev = null;
                insn.next = null;
                insn = next;
            }
        }
        size = 0;
        first = null;
        last = null;
        cache = null;
    }
567575
public void destroy()
    {
        super.destroy();
        if (isStarted())
            throw new IllegalStateException();

        _defaultsDescriptor=null;
        _war=null;
        _configurationClassNames=null;
        if (_resourceAliases!=null)
            _resourceAliases.clear();
        _resourceAliases=null;
        _contextListeners=null;
        if (_errorPages!=null)
            _errorPages.clear();
        _errorPages=null;
    }