151-1-2

BasicEList<Entry<K, V>> eList = entryData[index]; if (eList != null) { Object [] entries = eList.data; int size = eList.size; for (int j = 0; j < size; ++j) { @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j]; if (entry.getHash() == hash && key.equals(entry.getKey())) { return j; } } }
BasicEList<Entry<K, V>> eList = entryData[index]; if (eList != null) { Object [] entries = eList.data; int size = eList.size; for (int j = 0; j < size; ++j) { @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j]; if (entry.getKey() == key) { return j; } } }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/common/util/BasicEMap.java
Method name: `int entryIndexForKey(int, int, Object)` |  | Method name: `int entryIndexForKey(int, int, Object)`
Number of AST nodes: 8 |  | Number of AST nodes: 8

1

    BasicEList<Entry<K, V>> eList = entryData[index];↵

1

    BasicEList<Entry<K, V>> eList = entryData[index];↵

2

          if (eList != null)↵

2

          if (eList != null)↵

3

          {↵

3

          {↵

4

            Object [] entries = eList.data;↵

4

            Object [] entries = eList.data;↵

5

            int size = eList.size;↵

5

            int size = eList.size;↵

6

            for (int j = 0; j < size; ++j)↵

6

            for (int j = 0; j < size; ++j)↵

7

            {↵

7

            {↵

8

              @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j];↵

8

              @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j];↵

9

              if (entry.getHash() == hash && key.equals(entry.getKey())) ↵

9

              if (entry.getKey() == key) ↵

10

              {↵

10

              {↵

11

                return j;↵

11

                return j;↵

12

              }↵

12

              }↵

13

            }↵

13

            }↵

14

          }

14

          }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in the same method
Number of node comparisons | 1