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[i]; 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]; objectOutputStream.writeObject(entry.getKey()); objectOutputStream.writeObject(entry.getValue()); } }
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: void writeObject(ObjectOutputStream)
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[i];
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
  {
8
          @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j];
9
            @SuppressWarnings("unchecked") Entry<K, V> entry = (Entry<K, V>)entries[j];
9
          if (entry.getHash() == hash && key.equals(entry.getKey())) 
10
            objectOutputStream.writeObject(entry.getKey())
10
          {
11
            return j
11
;
12
;
12
            objectOutputStream.writeObject(entry.getValue());
13
          }
13
          }
14
        }
14
        }
15
      }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons1