for (int i = 0; i < entryData.length; ++i)
{
BasicEList<Entry<K, V>> eList = entryData[i];
if (eList != null)
{
@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;
}
}
}
}
for (int i = 0; i < entryData.length; ++i)
{
BasicEList<Entry<K, V>> eList = entryData[i];
if (eList != null)
{
@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.equals(entry.getValue()))
{
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 containsValue(Object)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | for (int i = 0; i < entryData.length; ++i)↵ | | 1 | for (int i = 0; i < entryData.length; ++i)↵
|
2 | {↵ | | 2 | {↵
|
3 | BasicEList<Entry<K, V>> eList = entryData[i];↵ | | 3 | BasicEList<Entry<K, V>> eList = entryData[i];↵
|
4 | if (eList != null)↵ | | 4 | if (eList != null)↵
|
5 | {↵ | | 5 | {↵
|
6 | @SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;↵ | | 6 | @SuppressWarnings("unchecked") Entry<K, V> [] entries = (Entry<K, V> [])eList.data;↵
|
7 | int size = eList.size;↵ | | 7 | int size = eList.size;↵
|
8 | for (int j = 0; j < size; ++j)↵ | | 8 | for (int j = 0; j < size; ++j)↵
|
9 | {↵ | | 9 | {↵
|
10 | Entry<K, V> entry = entries[j];↵ | | 10 | Entry<K, V> entry = entries[j];↵
|
11 | if (value == entry.getValue())↵ | | 11 | if (value.equals(entry.getValue()))↵
|
12 | {↵ | | 12 | {↵
|
13 | return true;↵ | | 13 | return true;↵
|
14 | }↵ | | 14 | }↵
|
15 | }↵ | | 15 | }↵
|
16 | }↵ | | 16 | }↵
|
17 | } | | 17 | }
|
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |