if (validator.isValid(entry.getEStructuralFeature()))
{
if (entry.getValue() == null)
{
match = entry;
break;
}
++count;
}
if (validator.isValid(entry.getEStructuralFeature()))
{
if (entry.getValue() == null)
{
match = entry;
break;
}
++count;
}
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(EStructuralFeature, Object, NotificationChain)
|
|
Method name: NotificationChain basicRemove(EStructuralFeature, Object, NotificationChain)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (validator.isValid(entry.getEStructuralFeature()))↵ | | 1 | if (validator.isValid(entry.getEStructuralFeature()))↵
|
2 | {↵ | | 2 | {↵
|
3 | if (entry.getValue() == null)↵ | | 3 | if (entry.getValue() == null)↵
|
4 | {↵ | | 4 | {↵
|
5 | match = entry;↵ | | 5 | match = entry;↵
|
6 | break;↵ | | 6 | break;↵
|
7 | }↵ | | 7 | }↵
|
8 | ++count;↵ | | 8 | ++count;↵
|
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 | 15 |
-
{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.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
23 | if (validator.isValid(entry.getEStructuralFeature())) | | 22 | if (validator.isValid(entry.getEStructuralFeature())) |
24 | if (entry.getValue() == null) | | 23 | if (entry.getValue() == null) |
25 | | | 24 | |
26 | | | 25 | |
27 | | | 26 | |
Precondition Violations (3)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |
3 | Clone fragment #1 returns variables match, count , while Clone fragment #2 returns variables match, count |