Utility method to reduce unchecked area.
7662
@SuppressWarnings("unchecked")
	private static Enumeration<LogEntry> getLogEntries(LogReaderService lrs)
	{
		return (Enumeration<LogEntry>)lrs.getLog();
	}
241738
def _handle_end_area(self):
        
        self._result.append(Area(result=self._result, **self._curr))
        self._curr = {}
902363
private static void trimPadding(List<Element> elements)
    {
        for (ListIterator<Element> it = elements.listIterator(elements.size()); it.hasPrevious();) {
            Element element = it.previous();

            if (element.compareTo(null) == 0) {
                it.remove();
            } else {
                break;
            }
        }
    }
132342
def OnDeleteRows(self, event):
        """"""

        bbox = self.grid.selection.get_bbox()

        if bbox is None or bbox[1][0] is None:
            # Insert rows at cursor
            del_point = self.grid.actions.cursor[0]
            no_rows = 1
        else:
            # Insert at lower edge of bounding box
            del_point = bbox[0][0]
            no_rows = self._get_no_rowscols(bbox)[0]

        with undo.group(_("Delete rows")):
            self.grid.actions.delete_rows(del_point, no_rows)

        self.grid.GetTable().ResetView()

        # Update the default sized cell sizes
        self.grid.actions.zoom()

        event.Skip()
1349299
void reduce() {
        // Note that the scanner choice is opposite of our type. This is
        // because a group of 'and's has children which are 'or's and vice
        // versa.
        Scanner<S> scanner = mForAnd ? OrChildScanner.THE : AndChildScanner.THE;

        Iterator<Filter<S>> it = mElements.iterator();
        aLoop:
        while (it.hasNext()) {
            Filter<S> a = it.next();
            for (Filter<S> b : mElements) {
                if (a != b) {
                    if (a.accept(scanner, b)) {
                        it.remove();
                        continue aLoop;
                    }
                }
            }
        }
    }
450325
def _clean(cls, value, invalid):
        """"""
        cls._deprecation_warning()
        return BlockUsageLocator._clean(value, invalid)
122719
def cleanup(self):
        """"""
        for item in self.server_map:
            self.member_del(item, reconfig=False)
        self.server_map.clear()
1129995
private void tidy() {
        nonPermanent.entrySet().stream()
                .map(entry -> {
                    List<WeakReference<IzouSoundLineBaseClass>> collect = entry.getValue().stream()
                            .filter(izouSoundLineWeakReference -> izouSoundLineWeakReference.get() != null)
                            .collect(Collectors.toList());
                    if (!collect.isEmpty()) {
                        nonPermanent.put(entry.getKey(), collect);
                        return null;
                    } else {
                        return entry;
                    }
                })
                .filter(Objects::nonNull)
                .forEach(entry -> nonPermanent.remove(entry.getKey()));
    }
1192432
private static void reduce(int size) {
    for (int i = 0; i < maxSelectors - size; i++) {
      try {
        Selector selector = selectors.pop();
        selector.close();
      } catch (IOException e) {
        logger.error("SelectorFactory.reduce", e);
      }
    }
  }
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)
214764
private void resizeNow() {
		invalidate();
		// find the validate root; adapted from the package-private SwingUtilities.getValidateRoot
		Container root = null;
		Container c=this;
		for (; c != null; c = c.getParent()) {
			if (!c.isDisplayable() || c instanceof CellRendererPane) {
				return;
			}
			if (c.isValidateRoot()) {
				root = c;
				break;
			}
		}

		if (root == null) return;

		for (; c != null; c = c.getParent()) {
			if (!c.isDisplayable() || !c.isVisible()) {
				return;
			}
			if (c instanceof Window || c instanceof Applet) {
				break;
			}
		}

		if (c==null) return;
		
		root.validate();
		repaint();
	}
871947
def OnResizeGrid(self, event):
        """"""

        shape = min(event.shape[2], 2**30)
        self.SetItemCount(shape)
        event.Skip()
40248
private void truncateUncommittedEntries() {
    if (type() == CopycatServer.State.PASSIVE) {
      context.getLog().truncate(Math.min(context.getCommitIndex(), context.getLog().lastIndex()));
    }
  }
710989
public void trimToSize() {
		modCount++;
		while ((bucketDepth > 0) && (bucketSize << ((bucketDepth-1)*bucketExp) >= size)) {
			bucket = (Object[]) bucket[0];
		}
	}
1013039
def _trim(self):
        
        index = self._get_index()
        backup_limit = config().backup_count() - 1

        for changeset in index[backup_limit:]:
            self.delete(changeset[0], p_write=False)
415142
def shrink (self):
        """"""
        trim = int(0.05*len(self))
        if trim:
            items = super(LFUCache, self).items()
            # sorting function for items
            keyfunc = lambda x: x[1][0]
            values = sorted(items, key=keyfunc)
            for item in values[0:trim]:
                del self[item[0]]
862946
public void truncate(int newsize) {
    if(newsize < size) {
      double[] odists = dists;
      dists = new double[newsize];
      System.arraycopy(odists, 0, dists, 0, newsize);
      int[] oids = ids;
      ids = new int[newsize];
      System.arraycopy(oids, 0, ids, 0, newsize);
      size = newsize;
    }
  }