if (object.equals(entry.getValue()))
{
feature = entry.getEStructuralFeature();
if (feature instanceof EReference && ((EReference)feature).isContainment())
{
match = entry;
break;
}
}
if (object.equals(entry.getValue()))
{
feature = entry.getEStructuralFeature();
if (feature instanceof EReference && ((EReference)feature).isContainment())
{
match = entry;
break;
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicFeatureMap.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/DelegatingFeatureMap.java
|
Method name: NotificationChain basicRemove(Object, NotificationChain)
|
|
Method name: NotificationChain basicRemove(Object, NotificationChain)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (object.equals(entry.getValue()))↵ | | 1 | if (object.equals(entry.getValue()))↵
|
2 | {↵ | | 2 | {↵
|
3 | feature = entry.getEStructuralFeature();↵ | | 3 | feature = entry.getEStructuralFeature();↵
|
4 | if (feature instanceof EReference && ((EReference)feature).isContainment())↵ | | 4 | if (feature instanceof EReference && ((EReference)feature).isContainment())↵
|
5 | {↵ | | 5 | {↵
|
6 | match = entry;↵ | | 6 | match = entry;↵
|
7 | break;↵ | | 7 | break;↵
|
8 | }↵ | | 8 | }↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
8 | if (object.equals(entry.getValue())) | | 7 | if (object.equals(entry.getValue())) |
9 | feature = entry.getEStructuralFeature(); | | 8 | feature = entry.getEStructuralFeature(); |
10 | if (feature instanceof EReference && ((EReference)feature).isContainment()) | | 9 | if (feature instanceof EReference && ((EReference)feature).isContainment()) |
11 | | | 10 | |
12 | | | 11 | |
Precondition Violations (3)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |
3 | Clone fragment #1 returns variables match, feature , while Clone fragment #2 returns variables match, feature |