/*
(non-Javadoc)

@see mtas.codec.util.DataCollector.MtasDataCollector#increaseNewListSize()
430582
@Override
  protected final void increaseNewListSize() throws IOException {
    // register old situation
    int tmpOldSize = newKeyList.length;
    int tmpNewPosition = newPosition;
    // increase
    super.increaseNewListSize();
    // reconstruct
    T1[] tmpNewBasicValueList = newBasicValueSumList;
    long[] tmpNewBasicValueNList = newBasicValueNList;
    newBasicValueSumList = operations.createVector1(newSize);
    newBasicValueNList = new long[newSize];
    newPosition = tmpNewPosition;
    System.arraycopy(tmpNewBasicValueList, 0, newBasicValueSumList, 0,
        tmpOldSize);
    System.arraycopy(tmpNewBasicValueNList, 0, newBasicValueNList, 0,
        tmpOldSize);
  }
801970
private void updateSize()
	{
		int length = frames.getLength();

		if (head.getExtendedHeader())
		{
			length += ext_head.getSize();
		}

		head.setTagSize(length);

		if (head.getFooter())
		{
			foot.setTagSize(length);
		}
	}
1327897
private void updateLargestChunkSoFarSize(@NotNull ByteBuffer outBuffer) {
        int sizeOfThisChunk = (int) (outBuffer.limit() - limitOfLast);
        if (largestChunkSoFar < sizeOfThisChunk)
            largestChunkSoFar = sizeOfThisChunk;

        limitOfLast = outBuffer.limit();
    }
732265
public void expand(boolean notifyItemChanged) {
        int length = mFastAdapter.getItemCount();
        for (int i = length - 1; i >= 0; i--) {
            expand(i, notifyItemChanged);
        }
    }
90830
private void growToSize (int minCapacity) {
		if (minCapacity < 0) // overflow
			throw new GdxRuntimeException("Capacity upper limit exceeded.");
		int oldCapacity = queue.length;
		// Double size if small; else grow by 50%
		int newCapacity = (int)((oldCapacity < 64) ? ((oldCapacity + 1) * CAPACITY_RATIO_HI) : (oldCapacity * CAPACITY_RATIO_LOW));
		if (newCapacity < 0) // overflow
			newCapacity = Integer.MAX_VALUE;
		if (newCapacity < minCapacity) newCapacity = minCapacity;
		Object[] newQueue = new Object[newCapacity];
		System.arraycopy(queue, 0, newQueue, 0, size);
		queue = newQueue;
	}
288098
private void resize(int newSize)
    {
        Object[] keys = _keys;
        int values[] = _values;

        _keys = new Object[newSize];
        _values = new int[newSize];
        _size = 0;

        _prime = getBiggestPrime(_keys.length);

        for (int i = keys.length - 1; i >= 0; i--) {
            Object key = keys[i];

            if (key != null) {
                put(key, values[i], true);
            }
        }
    }
350382
@Override
	protected void onSizeChanged(int w, int h, int oldw, int oldh) {
		if (w != oldw || h != oldh) {
			mNeedsResize = true;
		}
	}
815488
private synchronized void increaseClientCount(Entry<K, V> entry) {
    Preconditions.checkNotNull(entry);
    Preconditions.checkState(!entry.isOrphan);
    entry.clientCount++;
  }
554566
public final void increaseReadBytes(long increment, long currentTime) {
        if (increment <= 0) {
            return;
        }

        readBytes += increment;
        lastReadTime = currentTime;
        idleCountForBoth.set(0);
        idleCountForRead.set(0);

        if (getService() instanceof AbstractIoService) {
            getService().getStatistics().increaseReadBytes(increment, currentTime);
        }
    }
1214207
@Override
  protected final void increaseNewListSize() throws IOException {
    // register old situation
    int tmpOldSize = newKeyList.length;
    int tmpNewPosition = newPosition;
    // increase
    super.increaseNewListSize();
    // reconstruct
    T1[] tmpNewAdvancedValueSumList = newAdvancedValueSumList;
    T2[] tmpNewAdvancedValueSumOfLogsList = newAdvancedValueSumOfLogsList;
    T1[] tmpNewAdvancedValueSumOfSquaresList = newAdvancedValueSumOfSquaresList;
    T1[] tmpNewAdvancedValueMinList = newAdvancedValueMinList;
    T1[] tmpNewAdvancedValueMaxList = newAdvancedValueMaxList;
    long[] tmpNewAdvancedValueNList = newAdvancedValueNList;
    newAdvancedValueSumList = operations.createVector1(newSize);
    newAdvancedValueSumOfLogsList = operations.createVector2(newSize);
    newAdvancedValueSumOfSquaresList = operations.createVector1(newSize);
    newAdvancedValueMinList = operations.createVector1(newSize);
    newAdvancedValueMaxList = operations.createVector1(newSize);
    newAdvancedValueNList = new long[newSize];
    newPosition = tmpNewPosition;
    System.arraycopy(tmpNewAdvancedValueSumList, 0, newAdvancedValueSumList, 0,
        tmpOldSize);
    System.arraycopy(tmpNewAdvancedValueSumOfLogsList, 0,
        newAdvancedValueSumOfLogsList, 0, tmpOldSize);
    System.arraycopy(tmpNewAdvancedValueSumOfSquaresList, 0,
        newAdvancedValueSumOfSquaresList, 0, tmpOldSize);
    System.arraycopy(tmpNewAdvancedValueMinList, 0, newAdvancedValueMinList, 0,
        tmpOldSize);
    System.arraycopy(tmpNewAdvancedValueMaxList, 0, newAdvancedValueMaxList, 0,
        tmpOldSize);
    System.arraycopy(tmpNewAdvancedValueNList, 0, newAdvancedValueNList, 0,
        tmpOldSize);
  }
675741
public void updateSizes(@ProgressDrawableSize int size) {
        final DisplayMetrics metrics = mResources.getDisplayMetrics();
        final float screenDensity = metrics.density;

        if (size == LARGE) {
            setSizeParameters(CIRCLE_DIAMETER_LARGE*screenDensity, CIRCLE_DIAMETER_LARGE*screenDensity, CENTER_RADIUS_LARGE*screenDensity,
                    STROKE_WIDTH_LARGE*screenDensity, ARROW_WIDTH_LARGE*screenDensity, ARROW_HEIGHT_LARGE*screenDensity);
        } else {
            setSizeParameters(CIRCLE_DIAMETER*screenDensity, CIRCLE_DIAMETER*screenDensity, CENTER_RADIUS*screenDensity, STROKE_WIDTH*screenDensity,
                    ARROW_WIDTH*screenDensity, ARROW_HEIGHT*screenDensity);
        }
    }
592147
private void expandActivePath(int size) {
    if (activePath.length < size) {
      final int p = activePath.length;
      activePath = java.util.Arrays.copyOf(activePath, size);
      nextArcOffset = java.util.Arrays.copyOf(nextArcOffset, size);

      for (int i = p; i < size; i++) {
        nextArcOffset[i] = activePath[i] = allocateState(/* assume max labels count */MAX_LABELS);
      }
    }
  }
1211855
public void bumpTableSize(int iBumpIncrement, boolean bInsertRowsInModel)
    {
        int iRowCount = this.setRowCount(this.getRowCount(false) + iBumpIncrement);          // Theoretical EOF value for table scroller (Actual when known).
        if (m_iLastRecord != RECORD_UNKNOWN)
            m_iLastRecord = iRowCount - 1;     // Sync
        if (bInsertRowsInModel)
            this.fireTableRowsInserted(this.getRowCount(true) - iBumpIncrement, this.getRowCount(true) - 1);
    }
1325162
public void updateSize() {

        int availableHeight = CmsToolbarPopup.getAvailableHeight();
        int dialogWidth = CmsToolbarPopup.getAvailableWidth();

        A_CmsClipboardTab tab = m_tabs.getWidget(m_tabs.getSelectedIndex());
        int requiredHeight = tab.getRequiredHeight() + 31;
        int dialogHeight = availableHeight > requiredHeight ? requiredHeight : availableHeight;
        m_tabs.getParent().setHeight(dialogHeight + "px");
        getPopup().setWidth(dialogWidth);
        tab.getList().truncate("CLIPBOARD_TM", dialogWidth - 40);
        tab.getScrollPanel().onResizeDescendant();
    }
516146
@Override
  public void merge(MtasDataCollector<?, ?> newDataCollector,
      Map<MtasDataCollector<?, ?>, MtasDataCollector<?, ?>> map,
      boolean increaseSourceNumber) throws IOException {
    closeNewList();
    if (!collectorType.equals(newDataCollector.getCollectorType())
        || !dataType.equals(newDataCollector.getDataType())
        || !statsType.equals(newDataCollector.getStatsType())
        || !(newDataCollector instanceof MtasDataFull)) {
      throw new IOException("cannot merge different dataCollectors");
    } else {
      segmentRegistration = null;
      @SuppressWarnings("unchecked")
      MtasDataFull<T1, T2> newMtasDataFull = (MtasDataFull<T1, T2>) newDataCollector;
      closeNewList();
      initNewList(newMtasDataFull.getSize());
      if (collectorType.equals(DataCollector.COLLECTOR_TYPE_LIST)) {
        map.put(newDataCollector, this);
        for (int i = 0; i < newMtasDataFull.getSize(); i++) {
          if (newMtasDataFull.fullValueList[i].length > 0) {
            MtasDataCollector<?, ?>[] subCollectors = new MtasDataCollector<?, ?>[1];
            subCollectors[0] = add(newMtasDataFull.keyList[i],
                increaseSourceNumber);
            setError(newCurrentPosition, newMtasDataFull.errorNumber[i],
                newMtasDataFull.errorList[i], newCurrentExisting);
            setValue(newCurrentPosition, newMtasDataFull.fullValueList[i],
                newMtasDataFull.fullValueList[i].length, newCurrentExisting);
            if (hasSub() && newMtasDataFull.hasSub()) {
              // single key implies exactly one subCollector if hasSub
              subCollectors[0].merge(
                  newMtasDataFull.subCollectorListNextLevel[i], map,
                  increaseSourceNumber);
            }
          }
        }
      } else if (collectorType.equals(DataCollector.COLLECTOR_TYPE_DATA)) {
        map.put(newDataCollector, this);
        if (newMtasDataFull.getSize() > 0) {
          MtasDataCollector<?, ?> subCollector = add(increaseSourceNumber);
          setError(newCurrentPosition, newMtasDataFull.errorNumber[0],
              newMtasDataFull.errorList[0], newCurrentExisting);
          setValue(newCurrentPosition, newMtasDataFull.fullValueList[0],
              newMtasDataFull.fullValueList[0].length, newCurrentExisting);
          if (hasSub() && newMtasDataFull.hasSub()) {
            subCollector.merge(newMtasDataFull.subCollectorNextLevel, map,
                increaseSourceNumber);
          }
        }
      } else {
        throw new IOException("cannot merge " + collectorType);
      }
      closeNewList();
    }
  }
837767
@Override
    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
        super.onSizeChanged(w, h, oldw, oldh);
        if (onClickedDrawable != null) {
            onClickedDrawable.setBounds(0, 0, w, h);
        }
    }
1046215
public void resize(int newSize) {
    if (newSize > elements.length) {
      reallocate(Math.max(newSize, 2 * elements.length));
    } else {
      for (int i = size; i < newSize; i++) {
        elements[i] = 0;
      }
    }
    size = newSize;
  }