@SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data; int size = eList.size; for (int j = 0; j < size; ++j) { Entry<K, V> entry = entries[j]; if (value == entry.getValue()) { return true; } }
@SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data; int size = eList.size; for (int j = 0; j < size; ++j) { Entry<K, V> entry = entries[j]; if (entry.getHash() == hash && entry.equals(otherEntry)) { return true; } }
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: boolean containsValue(Object) Method name: boolean contains(Object)
Number of AST nodes: 6 Number of AST nodes: 6
1
@SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;
1
@SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;
2
            int size = eList.size;
2
              int size = eList.size;
3
            for (int j = 0; j < size; ++j)
3
              for (int j = 0; j < size; ++j)
4
            {
4
            
5
  {
5
              Entry<K, V> entry = entries[j];
6
                Entry<K, V> entry = entries[j];
6
              if (value == entry.getValue())
7
                if (entry.getHash() == hash && entry.equals(otherEntry))
7
              {
8
              
9
  {
8
                return true;
10
                  return true;
9
              }
11
              
12
  }
10
            }
13
              }
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.2
Clones locationClones are in the same java file
Number of node comparisons1