SAFE Logo
CodeMatch Detailed Report
Version: 5.6.0 | Date: 06/18/12 | Time: 19:09:04

SCORE

SETTINGS
Compare file 1: C:\Users\Evan\Desktop\Java2SE5.0\src\java\util\concurrent\ConcurrentHashMap.java
To file 2: C:\Users\Evan\Desktop\Android2.2Froyo\java\util\concurrent\ConcurrentHashMap.java
Links to results: Matching Statements
Matching Comments and Strings
Matching Instruction Sequences
Matching Identifiers
Partially Matching Identifiers
Score
RESULTS
Matching Statements
File1 Line# File2 Line# Statement
87package java.util.concurrent
98import java.util.concurrent.locks.*
109import java.util.*
1110import java.io.Serializable
1211import java.io.IOException
1312import java.io.ObjectInputStream
1413import java.io.ObjectOutputStream
7673public class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
7774implements ConcurrentMap<K, V>, Serializable {
7875private static final long serialVersionUID = 7249069246763182397L
99108static final int MAXIMUM_CAPACITY = 1 << 30
10594static final float DEFAULT_LOAD_FACTOR = 0.75f
116114static final int MAX_SEGMENTS = 1 << 16
124122static final int RETRIES_BEFORE_LOCK = 2
132130final int segmentMask
137135final int segmentShift
144142transient Set<K> keySet
145143transient Set<Map.Entry<K,V>> entrySet
146144transient Collection<V> values
161159h ^= (h >>> 10)
170171final Segment<K,V> segmentFor(int hash) {
188189static final class HashEntry<K,V> {
189190final K key
190191final int hash
191192volatile V value
192193final HashEntry<K,V> next
194195HashEntry(K key, int hash, HashEntry<K,V> next, V value) {
195
1313
196
1224
this.key = key
196197this.hash = hash
197198this.next = next
198
1314
1332
199
1225
1243
this.value = value
207213static final class Segment<K,V> extends ReentrantLock implements Serializable {
245251private static final long serialVersionUID = 2249069246763182397L
250256transient volatile int count
260266transient int modCount
267273transient int threshold
281286final float loadFactor
283288Segment(int initialCapacity, float lf) {
284289loadFactor = lf
293
459
303
467
threshold = (int)(newTable.length * loadFactor)
294
499
304
507
table = newTable
300310HashEntry<K,V> getFirst(int hash) {
312322V readValueUnderLock(HashEntry<K,V> e) {
313
371
389
408
506
541
323
379
397
416
514
549
lock()
315325return e.value
317
384
402
434
535
549
327
392
410
442
543
557
unlock()
323333V get(Object key, int hash) {
324
340
352
540
334
350
362
548
if (count != 0) {
325
341
373
391
335
351
381
399
HashEntry<K,V> e = getFirst(hash)
326
342
336
352
while (e != null) {
327337if (e.hash == hash && key.equals(e.key)) {
328
359
518
338
367
526
V v = e.value
329339if (v != null)
330340
1134
return v
331341return readValueUnderLock(e)
333
345
375
393
418
514
343
355
383
401
426
522
e = e.next
339349boolean containsKey(Object key, int hash) {
343353if (e.hash == hash && key.equals(e.key))
351361boolean containsValue(Object value) {
354364int len = tab.length
355
461
544
603
656
666
687
692
705
707
709
773
781
793
797
804
981
1377
1402
365
469
552
611
669
679
706
711
724
726
728
791
799
811
815
822
949
1287
1311
for (int i = 0
355365i < len
355
461
365
469
i++) {
357
1378
366
1288
e != null
358
1378
366
1288
e = e.next) {
360368if (v == null)
361369v = readValueUnderLock(e)
362370if (value.equals(v))
370378boolean replace(K key, int hash, V oldValue, V newValue) {
374
392
417
513
382
400
425
521
while (e != null && (e.hash != hash || !key.equals(e.key)))
377385boolean replaced = false
378386if (e != null && oldValue.equals(e.value)) {
379387replaced = true
380
398
388
406
e.value = newValue
382390return replaced
388396V replace(K key, int hash, V newValue) {
395
516
403
524
V oldValue = null
396
421
466
517
404
429
474
525
if (e != null) {
397
422
405
430
oldValue = e.value
400
432
533
1333
408
440
541
1244
return oldValue
407415V put(K key, int hash, V value, boolean onlyIfAbsent) {
410418int c = count
411419if (c++ > threshold)
412420rehash()
414
510
422
518
int index = hash & (tab.length - 1)
416
512
424
520
HashEntry<K,V> e = first
420428V oldValue
423431if (!onlyIfAbsent)
424432e.value = value
427435oldValue = null
428
524
546
436
532
554
++modCount
429437tab[index] = new HashEntry<K,V>(key, hash, first, value)
430
530
438
538
count = c
438446void rehash() {
440448int oldCapacity = oldTable.length
441449if (oldCapacity >= MAXIMUM_CAPACITY)
460468int sizeMask = newTable.length - 1
461469i < oldCapacity
467475HashEntry<K,V> next = e.next
468476int idx = e.hash & sizeMask
471479if (next == null)
472480newTable[idx] = e
476484HashEntry<K,V> lastRun = e
477485int lastIdx = idx
478486for (HashEntry<K,V> last = next
479487last != null
480488last = last.next) {
481489int k = last.hash & sizeMask
482490if (k != lastIdx) {
483491lastIdx = k
484492lastRun = last
487495newTable[lastIdx] = lastRun
490498for (HashEntry<K,V> p = e
490498p != lastRun
490498p = p.next) {
491499int k = p.hash & sizeMask
493501newTable[k] = new HashEntry<K,V>(p.key, p.hash,
494502n, p.value)
505513V remove(Object key, int hash, Object value) {
508516int c = count - 1
519527if (value == null || value.equals(v)) {
520528oldValue = v
525533HashEntry<K,V> newFirst = e.next
526534for (HashEntry<K,V> p = first
526534p != e
526534p = p.next)
527535newFirst = new HashEntry<K,V>(p.key, p.hash,
528536newFirst, p.value)
529537tab[index] = newFirst
539547void clear() {
544
1377
552
1287
i < tab.length
544552i++)
545553tab[i] = null
547555count = 0
575583public ConcurrentHashMap(int initialCapacity,
576584float loadFactor, int concurrencyLevel) {
577585if (!(loadFactor > 0) || initialCapacity < 0 || concurrencyLevel <= 0)
578586throw new IllegalArgumentException()
580588if (concurrencyLevel > MAX_SEGMENTS)
581589concurrencyLevel = MAX_SEGMENTS
584592int sshift = 0
585593int ssize = 1
586594while (ssize < concurrencyLevel) {
587595++sshift
588596ssize <<= 1
590598segmentShift = 32 - sshift
591599segmentMask = ssize - 1
594602if (initialCapacity > MAXIMUM_CAPACITY)
595603initialCapacity = MAXIMUM_CAPACITY
596604int c = initialCapacity / ssize
597605if (c * ssize < initialCapacity)
598606++c
599607int cap = 1
600608while (cap < c)
601609cap <<= 1
603611i < this.segments.length
603
705
707
709
793
804
981
611
724
726
728
811
822
949
++i)
604612this.segments[i] = new Segment<K,V>(cap, loadFactor)
616624public ConcurrentHashMap(int initialCapacity) {
624632public ConcurrentHashMap() {
643656
1155
1176
1207
public boolean isEmpty() {
654
680
767
667
699
785
int[] mc = new int[segments.length]
655
686
772
668
705
790
int mcsum = 0
656
666
687
692
705
707
709
773
781
793
797
804
981
1402
669
679
706
711
724
726
728
791
799
811
815
822
949
1311
i < segments.length
656
666
687
692
773
781
797
1377
1402
669
679
706
711
791
799
815
1287
1311
++i) {
657670if (segments[i].count != 0)
660
689
775
673
708
793
mcsum += mc[i] = segments[i].modCount
665
691
780
678
710
798
if (mcsum != 0) {
667680if (segments[i].count != 0 ||
668681mc[i] != segments[i].modCount)
676
1211
1241
1281
695
1152
1173
1204
public int size() {
678697long sum = 0
679698long check = 0
683
770
1372
702
788
1282
for (int k = 0
683
770
702
788
k < RETRIES_BEFORE_LOCK
683
770
1372
702
788
1282
++k) {
684703check = 0
685
704
704
723
sum = 0
688
708
707
727
sum += segments[i].count
693712check += segments[i].count
694
783
713
801
if (mc[i] != segments[i].modCount) {
695714check = -1
700719if (check == sum)
703722if (check != sum) {
706
794
725
812
segments[i].lock()
710
805
729
823
segments[i].unlock()
712731if (sum > Integer.MAX_VALUE)
713732return Integer.MAX_VALUE
715734return (int)sum
729748public V get(Object key) {
731750return segmentFor(hash).get(key, hash)
744762public boolean containsKey(Object key) {
746764return segmentFor(hash).containsKey(key, hash)
760778public boolean containsValue(Object value) {
761
845
870
970
779
861
875
914
939
if (value == null)
762
846
871
948
971
780
862
876
926
940
throw new NullPointerException()
771789int sum = 0
774
782
792
800
int c = segments[i].count
776794if (segments[i].containsValue(value))
779797boolean cleanSweep = true
784802cleanSweep = false
789807if (cleanSweep)
795813boolean found = false
798816if (segments[i].containsValue(value)) {
799817found = true
807825return found
825843public boolean contains(Object value) {
826844return containsValue(value)
844860public V put(K key, V value) {
848864return segmentFor(hash).put(key, hash, value, false)
869874public V putIfAbsent(K key, V value) {
873878return segmentFor(hash).put(key, hash, value, true)
888890put(e.getKey(), e.getValue())
902902public V remove(Object key) {
904904return segmentFor(hash).remove(key, hash, null)
923912public boolean remove(Object key, Object value) {
925916return segmentFor(hash).remove(key, hash, value) != null
946924public boolean replace(K key, V oldValue, V newValue) {
947925if (oldValue == null || newValue == null)
950928return segmentFor(hash).replace(key, hash, oldValue, newValue)
969938public V replace(K key, V value) {
973942return segmentFor(hash).replace(key, hash, value)
980
1220
1247
1284
948
1164
1182
1210
public void clear() {
982950segments[i].clear()
1001969public Set<K> keySet() {
1002970Set<K> ks = keySet
1003971return (ks != null) ? ks : (keySet = new KeySet())
1023990public Collection<V> values() {
1024991Collection<V> vs = values
1025992return (vs != null) ? vs : (values = new Values())
10461011public Set<Map.Entry<K,V>> entrySet() {
10471012Set<Map.Entry<K,V>> es = entrySet
10581022public Enumeration<K> keys() {
1059
1209
1023
1150
return new KeyIterator()
10681032public Enumeration<V> elements() {
1069
1239
1033
1171
return new ValueIterator()
10741038abstract class HashIterator {
10751039int nextSegmentIndex
10761040int nextTableIndex
10781042HashEntry<K, V> nextEntry
10791043HashEntry<K, V> lastReturned
10811045HashIterator() {
10821046nextSegmentIndex = segments.length - 1
10831047nextTableIndex = -1
1084
1118
1048
1082
advance()
10871051public boolean hasMoreElements() { return hasNext()
10891053final void advance() {
10901054if (nextEntry != null && (nextEntry = nextEntry.next) != null)
10931057while (nextTableIndex >= 0) {
10981062while (nextSegmentIndex >= 0) {
11001064if (seg.count != 0) {
11011065currentTable = seg.table
11021066for (int j = currentTable.length - 1
11021066j >= 0
11021066--j) {
11041068nextTableIndex = j - 1
11121076public boolean hasNext() { return nextEntry != null
11141078HashEntry<K,V> nextEntry() {
11151079if (nextEntry == null)
11161080throw new NoSuchElementException()
11171081lastReturned = nextEntry
11191083return lastReturned
11221086public void remove() {
1123
1155
1161
1167
1174
1184
1195
1087if (lastReturned == null)
1124
1156
1162
1168
1088throw new IllegalStateException()
11251089ConcurrentHashMap.this.remove(lastReturned.key)
11261090lastReturned = null
11311098public K next() { return super.nextEntry().key
11321099public K nextElement() { return super.nextEntry().key
11361106public V next() { return super.nextEntry().value
11371107public V nextElement() { return super.nextEntry().value
11491142public Map.Entry<K,V> next() {
1154
1322
1233public K getKey() {
1160
1326
1237public V getValue() {
1166
1330
1130
1241
public V setValue(V value) {
1172
1336
1247public boolean equals(Object o) {
1176
1269
1276
1337
1192
1199
1248
if (!(o instanceof Map.Entry))
1178
1339
1250Map.Entry e = (Map.Entry)o
1182
1343
1254public int hashCode() {
1193
1348
1259public String toString() {
1202
1353
1264return (o1 == null ? o2 == null : o1.equals(o2))
12071148final class KeySet extends AbstractSet<K> {
12081149public Iterator<K> iterator() {
1212
1242
1282
1153
1174
1205
return ConcurrentHashMap.this.size()
1214
1244
1268
1158
1179
1191
public boolean contains(Object o) {
12151159return ConcurrentHashMap.this.containsKey(o)
1217
1275
1161
1198
public boolean remove(Object o) {
12181162return ConcurrentHashMap.this.remove(o) != null
1221
1248
1285
1165
1183
1211
ConcurrentHashMap.this.clear()
12371169final class Values extends AbstractCollection<V> {
12381170public Iterator<V> iterator() {
12451180return ConcurrentHashMap.this.containsValue(o)
12641187final class EntrySet extends AbstractSet<Map.Entry<K,V>> {
12651188public Iterator<Map.Entry<K,V>> iterator() {
12661189return new EntryIterator()
12721195V v = ConcurrentHashMap.this.get(e.getKey())
12731196return v != null && v.equals(e.getValue())
12791202return ConcurrentHashMap.this.remove(e.getKey(), e.getValue())
13091220K key
13101221V value
13121223public SimpleEntry(K key, V value) {
13171228public SimpleEntry(Entry<K,V> e) {
13181229this.key = e.getKey()
13191230this.value = e.getValue()
13231234return key
13271238return value
13311242V oldValue = this.value
13401251return eq(key, e.getKey()) && eq(value, e.getValue())
13441255return ((key == null) ? 0 : key.hashCode()) ^
13451256((value == null) ? 0 : value.hashCode())
13491260return key + + value
13521263static boolean eq(Object o1, Object o2) {
13691279private void writeObject(java.io.ObjectOutputStream s) throws IOException {
13701280s.defaultWriteObject()
13721282k < segments.length
13741284seg.lock()
13791289s.writeObject(e.key)
13801290s.writeObject(e.value)
13841294seg.unlock()
1387
1388
1297
1298
s.writeObject(null)
13971306private void readObject(java.io.ObjectInputStream s)
13981307throws IOException, ClassNotFoundException {
13991308s.defaultReadObject()
14031312segments[i].setTable(new HashEntry[1])
14081317K key = (K) s.readObject()
14091318V value = (V) s.readObject()
14101319if (key == null)
14121321put(key, value)

to top

Matching Comments and Strings
File1 Line# File2 Line# Comment/String
1720* A hash table supporting full concurrency of retrievals and
1821* adjustable expected concurrency for updates. This class obeys the
1922* same functional specification as {@link java.util.Hashtable}, and
2023* includes versions of methods corresponding to each method of
2124* <tt>Hashtable</tt>. However, even though all operations are
2225* thread-safe, retrieval operations do <em>not</em> entail locking,
2326* and there is <em>not</em> any support for locking the entire table
2427* in a way that prevents all access. This class is fully
2528* interoperable with <tt>Hashtable</tt> in programs that rely on its
2629* thread safety but not on its synchronization details.
2831* <p> Retrieval operations (including <tt>get</tt>) generally do not
2932* block, so may overlap with update operations (including
3033* <tt>put</tt> and <tt>remove</tt>). Retrievals reflect the results
3134* of the most recently <em>completed</em> update operations holding
3235* upon their onset. For aggregate operations such as <tt>putAll</tt>
3336* and <tt>clear</tt>, concurrent retrievals may reflect insertion or
3437* removal of only some entries. Similarly, Iterators and
3538* Enumerations return elements reflecting the state of the hash table
3639* at some point at or since the creation of the iterator/enumeration.
4143* <p> The allowed concurrency among update operations is guided by
4244* the optional <tt>concurrencyLevel</tt> constructor argument
4446* table is internally partitioned to try to permit the indicated
4547* number of concurrent updates without contention. Because placement
4648* in hash tables is essentially random, the actual concurrency will
4749* vary. Ideally, you should choose a value to accommodate as many
4850* threads as will ever concurrently modify the table. Using a
4951* significantly higher value than you need can waste space and time,
5052* and a significantly lower value can lead to thread contention. But
5153* overestimates and underestimates within an order of magnitude do
5254* not usually have much noticeable impact. A value of one is
5355* appropriate when it is known that only one thread will modify and
5456* all others will only read. Also, resizing this or any other kind of
5557* hash table is a relatively slow operation, so, when possible, it is
5658* a good idea to provide estimates of expected table sizes in
5759* constructors.
5961* <p>This class and its views and iterators implement all of the
6062* <em>optional</em> methods of the {@link Map} and {@link Iterator}
6163* interfaces.
7168* @since 1.5
7269* @author Doug Lea
7370* @param <K> the type of keys maintained by this map
7471* @param <V> the type of mapped values
8178* The basic strategy is to subdivide the table among Segments,
8279* each of which itself is a concurrently readable hash table.
8582---------------- Constants --------------
94103* The maximum capacity, used if a higher value is implicitly
95104* specified by either of the constructors with arguments. MUST
97106* using ints.
113111* The maximum number of segments to allow; used to bound
114112* constructor arguments.
116114slightly conservative
119117* Number of unsynchronized retries in size and containsValue
120118* methods before resorting to locking. This is used to avoid
121119* unbounded retries if tables undergo continuous modification
122120* which would make it impossible to obtain an accurate result.
126124---------------- Fields --------------
129127* Mask value for indexing into segments. The upper bits of a
130128* key's hash code are used to choose the segment.
135133* Shift value for indexing within segments.
140138* The segments, each of which is a specialized hash table
148146---------------- Small Utilities --------------
166167* Returns the segment that should be used for key with given hash
167168* @param hash the hash code for the key
168169* @return the segment
174175---------------- Inner Classes --------------
177178* ConcurrentHashMap list entry. Note that this is never exported
178179* out as a user-visible Map.Entry.
180181* Because the value field is volatile, not final, it is legal wrt
181182* the Java Memory Model for an unsynchronized reader to see null
182183* instead of initial value when read via a data race. Although a
183184* reordering leading to this is not likely to ever actually
184185* occur, the Segment.readValueUnderLock method is used as a
185186* backup in case a null (pre-initialized) value is ever seen in
186187* an unsynchronized access method.
203209* Segments are specialized versions of hash tables. This
204210* subclasses from ReentrantLock opportunistically, just to
205211* simplify some locking and avoid separate construction.
209215* Segments maintain a table of entry lists that are ALWAYS
210216* kept in a consistent state, so can be read without locking.
211217* Next fields of nodes are immutable (final). All list
212218* additions are performed at the front of each bin. This
213219* makes it easy to check changes, and also fast to traverse.
214220* When nodes would otherwise be changed, new nodes are
215221* created to replace them. This works well for hash tables
216222* since the bin lists tend to be short. (The average length
217223* is less than two for the default load factor threshold.)
219225* Read operations can thus proceed without locking, but rely
220226* on selected uses of volatiles to ensure that completed
221227* write operations performed by other threads are
222228* noticed. For most purposes, the "count" field, tracking the
223229* number of elements, serves as that volatile variable
224230* ensuring visibility. This is convenient because this field
225231* needs to be read in many read operations anyway:
227233* - All (unsynchronized) read operations must first read the
228234* "count" field, and should not look at table entries if
229235* it is 0.
231237* - All (synchronized) write operations should write to
232238* the "count" field after structurally changing any bin.
233239* The operations must not take any action that could even
234240* momentarily cause a concurrent read operation to see
235241* inconsistent data. This is made easier by the nature of
236242* the read operations in Map. For example, no operation
237243* can reveal that the table has grown but the threshold
238244* has not yet been updated, so there are no atomicity
239245* requirements for this with respect to reads.
241247* As a guide, all critical volatile reads and writes to the
242248* count field are marked in code comments.
248254* The number of elements in this segment's region.
253259* Number of updates that alter the size of the table. This is
254260* used during bulk-read methods to make sure they see a
255261* consistent snapshot: If modCounts change during a traversal
256262* of segments computing size or checking containsValue, then
257263* we might have an inconsistent view of state so (usually)
258264* must retry.
263269* The table is rehashed when its size exceeds this threshold.
276281* The load factor for the hash table. Even though this value
277282* is same for all segments, it is replicated to avoid needing
278283* links to outer object.
279284* @serial
290300* Call only while holding lock or in constructor.
307317* field ever appears to be null. This is possible only if a
308318* compiler happens to reorder a HashEntry initialization with
309319* its table assignment, which is legal under memory model
310320* but is not known to ever occur.
321331Specialized implementations of map methods
324
340
352
334
350
362
read-volatile
331
360
341
368
recheck
411419ensure capacity
430
530
547
438
538
555
write-volatile
445453* Reclassify nodes in each list to new Map. Because we are
446454* using power-of-two expansion, the elements from each bin
447455* must either stay at same index, or move with a power of two
448456* offset. We eliminate unnecessary node creation by catching
449457* cases where old nodes can be reused because their next
450458* fields won't change. Statistically, at the default
451459* threshold, only about one-sixth of them need cloning when
452460* a table doubles. The nodes they replace will be garbage
453461* collectable as soon as they are no longer referenced by any
454462* reader thread that may be in the midst of traversing table
455463* right now.
462470We need to guarantee that any existing reads of old Map can
463471proceed. So we cannot yet null out each bin.
470478Single node on list
475483Reuse trailing consecutive sequence at same slot
489497Clone all remaining nodes
503511* Remove; match on key only if value null, else match both.
521529All entries following removed node can stay
522530in list, but all preceding ones need to be
523531cloned.
557565---------------- Public operations --------------
560
608
568* Creates a new, empty map with the specified initial
563
611
571
619
* @param initialCapacity the initial capacity. The implementation
564
612
572
620
* performs internal sizing to accommodate this many elements.
565573* @param loadFactor the load factor threshold, used to control resizing.
566574* Resizing may be performed when the average number of elements per
567575* bin exceeds this threshold.
568576* @param concurrencyLevel the estimated number of concurrently
569577* updating threads. The implementation performs internal sizing
570578* to try to accommodate this many threads.
571579* @throws IllegalArgumentException if the initial capacity is
572580* negative or the load factor or concurrencyLevel are
573581* nonpositive.
583591Find power-of-two sizes best matching arguments
613621* @throws IllegalArgumentException if the initial capacity of
614622* elements is negative.
646659* We keep track of per-segment modCounts to avoid ABA
647660* problems in which an element in one segment was added and
648661* in another removed during traversal, in which case the
649662* table was never actually empty at any point. Note the
650663* similar use of modCounts in the size() and containsValue()
651664* methods, which are the only other methods also susceptible
652665* to ABA problems.
662675If mcsum happens to be zero, then we know we got a snapshot
663676before any modifications at all were made. This is
664677probably common enough to bother tracking.
681700Try a few times to get accurate count. On failure due to
682701continuous async changes in table, resort to locking.
695714force retry
703
792
722
810
Resort to locking all segments
735754* Tests if the specified object is a key in this table.
738757* @return <tt>true</tt> if and only if the specified object
739758* is a key in this table, as determined by the
740759* <tt>equals</tt> method; <tt>false</tt> otherwise.
750768* Returns <tt>true</tt> if this map maps one or more keys to the
751769* specified value. Note: This method requires a full internal
752770* traversal of the hash table, and so is much slower than
753771* method <tt>containsKey</tt>.
756774* @return <tt>true</tt> if this map maps one or more keys to the
764782See explanation of modCount use above
769787Try a few times without locking
811829* Legacy method testing if some key maps into the specified value
812830* in this table. This method is identical in functionality to
813831* {@link #containsValue}, and exists solely to ensure
814832* full compatibility with class {@link java.util.Hashtable},
815833* which supported this method prior to introduction of the
816834* Java Collections framework.
819837* @return <tt>true</tt> if and only if some key maps to the
820838* <tt>value</tt> argument in this table as
821839* determined by the <tt>equals</tt> method;
834851* <p> The value can be retrieved by calling the <tt>get</tt> method
835852* with a key that is equal to the original key.
878882* Copies all of the mappings from the specified map to this one.
880883* These mappings replace any mappings that this map had for any of the
881884* keys currently in the specified Map.
992961
1003
* <tt>addAll</tt> operations.
995
1017
1040
965
986
1007
* and guarantees to traverse elements as they existed upon
996
1018
1041
966
987
1008
* construction of the iterator, and may (but is not guaranteed to)
997
1019
1042
967
988
1009
* reflect any modifications subsequent to construction.
10531017* Returns an enumeration of the keys in this table.
10631027* Returns an enumeration of the values in this table.
10721036---------------- Iterator Support --------------
13051216* This duplicates java.util.AbstractMap.SimpleEntry until this class
13061217* is made accessible.
13571268---------------- Serialization Support --------------
1363
1395
1273
1304
* @param s the stream
13641274* @serialData
13651275* the key (Object) and value (Object)
13661276* for each key-value mapping, followed by a null pair.
13671277* The key-value mappings are emitted in no particular order.
14011310Initialize each segment to be minimally sized, and let grow.
14061315Read the keys and values, and put the mappings in the table

to top

Matching Instruction Sequences
File1 Line# File2 Line# Number of matching instructions
8 7 22
158 159 17
207 213 10
292 302 206
638 647 131
826 916 13
925 844 13
925 916 69
1202 1144 11
1207 1169 11
1208 1152 10
1264 1187 17
1308 1219 63

to top

Matching Identifiers
10 14 16 2249069246763182397L 30 32 7249069246763182397L 75f
AbstractCollection AbstractMap AbstractSet advance cap check ClassNotFoundException cleanSweep
clear Collection concurrencyLevel concurrent ConcurrentHashMap ConcurrentMap contains containsKey
containsValue count currentTable DEFAULT_INITIAL_CAPACITY DEFAULT_LOAD_FACTOR defaultReadObject defaultWriteObject elements
Entry EntryIterator entrySet Enumeration eq equals es first
found get getFirst getKey getValue hash hashCode HashEntry
HashIterator hasMoreElements hasNext idx IllegalArgumentException IllegalStateException index initialCapacity
io IOException isEmpty Iterator java key KeyIterator keys
keySet ks last lastIdx lastReturned lastRun len length
lf loadFactor lock locks Map Math max MAX_SEGMENTS
MAX_VALUE MAXIMUM_CAPACITY mc mcsum modCount newFirst newTable newValue
next nextElement nextEntry nextSegmentIndex nextTableIndex NoSuchElementException NullPointerException o1
o2 Object ObjectInputStream ObjectOutputStream oldCapacity oldTable oldValue onlyIfAbsent
put putAll putIfAbsent readObject readValueUnderLock ReentrantLock rehash remove
replace replaced RETRIES_BEFORE_LOCK seg Segment segmentFor segmentMask segments
segmentShift Serializable serialVersionUID Set setTable setValue SimpleEntry size
sizeMask sshift ssize sum tab table threshold toString
unlock util value ValueIterator values vs writeObject

to top

Partially Matching Identifiers
File1 Identifiers
ArrayList DEFAULT_SEGMENTS
File2 Identifiers
DEFAULT_CONCURRENCY_LEVEL newArray WriteThroughEntry
to the top
SCORE 72

CodeSuite copyright 2003-2012 by Software Analysis and Forensic Engineering Corporation