/*
(non-Javadoc)
@see org.overture.interpreter.traces.IIterableTraceNode#size()
547218
@Override
	public int size()
	{
		if (indics != null)
		{
			return indics.size();
		}

		indics = new HashMap<Integer, Pair<Integer, Integer>>();

		int size = 0;
		TestSequence rtests = repeat.getTests();
		int count = rtests.size();
		for (int r = from; r <= to; r++)
		{
			if (r == 0)
			{

				indics.put(size, new Pair<Integer, Integer>(r, 0));
				size++;
				continue;
			}

			int[] c = new int[r];

			for (int i = 0; i < r; i++)
			{
				c[i] = count;
			}

			Permutor p = new Permutor(c);

			int j = 0;
			while (p.hasNext())
			{
				j++;
				p.next();
				indics.put(size, new Pair<Integer, Integer>(r, j));
				size++;
			}
		}
		return size;
	}
721066
public int size()
    {
        int count = 0;

        if (subMaps != null)
        {
            for (int i = 0; i < subMaps.length; i++)
            {
                count += subMaps[i].size();
            }
        }
        return count;
    }
190088
@Override
	public int size() {

		if (allElementsInCache) {
			return orderedCache.size();
		} else {
			int count = 0;
			try (final RocksBytesIterator iterator = orderedBytesIterator()) {
				while (iterator.hasNext()) {
					iterator.next();
					++count;
				}
			}
			return count;
		}
	}
1129976
public int getSize() {
        int ret = 0;
        MethodState state = firstPointer;
        while (state != null) {
            ret++;
            state = state.getNext();
        }
        return ret;
    }
243596
@Override
    public int size() {
        // Try a few times to get accurate count. On failure due to
        // continuous async changes in table, resort to locking.
        final Segment<K,V>[] segments = this.segments;
        int size;
        boolean overflow; // true if size overflows 32 bits
        long sum;         // sum of modCounts
        long last = 0L;   // previous sum
        int retries = -1; // first iteration isn't retry
        try {
            for (;;) {
                if (retries++ == RETRIES_BEFORE_LOCK) {
                    for (int j = 0; j < segments.length; ++j)
                     {
                      ensureSegment(j).lock(); // force creation
                    }
                }
                sum = 0L;
                size = 0;
                overflow = false;
                for (int j = 0; j < segments.length; ++j) {
                    Segment<K,V> seg = segmentAt(segments, j);
                    if (seg != null) {
                        sum += seg.modCount;
                        int c = seg.count;
                        if (c < 0 || (size += c) < 0) {
                          overflow = true;
                        }
                    }
                }
                if (sum == last) {
                  break;
                }
                last = sum;
            }
        } finally {
            if (retries > RETRIES_BEFORE_LOCK) {
                for (int j = 0; j < segments.length; ++j) {
                  segmentAt(segments, j).unlock();
                }
            }
        }
        return overflow ? Integer.MAX_VALUE : size;
    }
534939
public int size() {
        int size = 0;
        try {
            if (getParent() != null) {
                size = getParent().locateChildElements(getLocator()).size();
            } else {
                size = HtmlElementUtils.locateElements(getLocator()).size();
            }
        } catch (NoSuchElementException e) { // NOSONAR
            // do nothing, let size be returned as 0
        }

        return size;
    }
523064
public int getSize() {
        return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE);

    }
481432
@Override
    public int size ()
    {
        // dumb implementation. You should override.
        int size = 0;
        for (Interator it = interator(); (size < Integer.MAX_VALUE) && it.hasNext(); it.nextInt()) {
            size++;
        }
        return size;
    }
1127177
public final void setToSize(int size) {
    
    Object newMap[] = new Object[size];
    
    System.arraycopy(m_map, 0, newMap, 0, m_firstFree);
    m_mapSize = size;

    m_map = newMap;
    
  }
1027804
@Override
	public long getSize() throws IOException {
		if (length < 0) {
			try {
				if (activeMethod != null) {
					length = activeMethod.getResponseContentLength();
				} else {
					acquireLength();
				}
			} catch (URISyntaxException e) {
				throw new IOException(e);
			}
		}
		return length;
	}
1178612
@Override
    public int size () {
        int size = Smb2Constants.SMB2_HEADER_LENGTH + 40;
        if ( this.inputBuffer != null ) {
            size += this.inputBuffer.size();
        }
        return size8(size);
    }
1173472
@Override
    public int size(PersistentStore store) {

        int count = 0;

        readLock.lock();

        try {
            RowIterator it = firstRow(null, store);

            while (it.hasNext()) {
                it.getNextRow();

                count++;
            }

            return count;
        } finally {
            readLock.unlock();
        }
    }
506140
public Criteria size(int size) {
        this.criteriaType = RelationalOperator.SIZE;
        this.right = ValueNode.toValueNode(size);
        return this;
    }
138396
@Override
    public int size() {
	final Segment<K, V>[] segments = this.segments;
	long sum = 0;
	long check = 0;
	int[] mc = new int[segments.length];
	// Try a few times to get accurate count. On failure due to
	// continuous async changes in table, resort to locking.
	for (int k = 0; k < RETRIES_BEFORE_LOCK; ++k) {
	    check = 0;
	    sum = 0;
	    int mcsum = 0;
	    for (int i = 0; i < segments.length; ++i) {
		sum += segments[i].count;
		mcsum += mc[i] = segments[i].modCount;
	    }
	    if (mcsum != 0) {
		for (int i = 0; i < segments.length; ++i) {
		    check += segments[i].count;
		    if (mc[i] != segments[i].modCount) {
			check = -1; // force retry
			break;
		    }
		}
	    }
	    if (check == sum) break;
	}
	if (check != sum) { // Resort to locking all segments
	    sum = 0;
	    for (int i = 0; i < segments.length; ++i)
		segments[i].lock();
	    for (int i = 0; i < segments.length; ++i)
		sum += segments[i].count;
	    for (int i = 0; i < segments.length; ++i)
		segments[i].unlock();
	}
	if (sum > Integer.MAX_VALUE) return Integer.MAX_VALUE;
	return (int) sum;
    }
578579
@SuppressWarnings("PMD.UnusedLocalVariable")
  public static <T> int size(Iterable<T> iter) {
    if (iter instanceof ArrayTagSet) {
      return ((ArrayTagSet) iter).size();
    } else if (iter instanceof Collection<?>) {
      return ((Collection<?>) iter).size();
    } else {
      int size = 0;
      for (T v : iter) {
        ++size;
      }
      return size;
    }
  }
876478
protected int getSize()
   {      
      if (tc.isEntryEnabled()) SibTr.entry(this, tc, "getSize");
      if (tc.isEntryEnabled()) SibTr.exit(this, tc, "getSize", ""+size);
      return size;
   }
335474
public static int size(Object list) {
        if (list == null)
            return 0;
        if (list instanceof List)
            return ((List<?>) list).size();
        return 1;
    }