if (validator.isValid(entry.getEStructuralFeature()))
{
if (object.equals(entry.getValue()))
{
remove(i);
return true;
}
}
if (validator.isValid(entry.getEStructuralFeature()))
{
if (object.equals(entry.getValue()))
{
remove(i);
return true;
}
}
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: boolean remove(EStructuralFeature, Object)
|
|
Method name: boolean remove(EStructuralFeature, Object)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (validator.isValid(entry.getEStructuralFeature()))↵ | | 1 | if (validator.isValid(entry.getEStructuralFeature()))↵
|
2 | {↵ | | 2 | {↵
|
3 | if (object.equals(entry.getValue()))↵ | | 3 | if (object.equals(entry.getValue()))↵
|
4 | {↵ | | 4 | {↵
|
5 | remove(i);↵ | | 5 | remove(i);↵
|
6 | return true;↵ | | 6 | return true;↵
|
7 | }↵ | | 7 | }↵
|
8 | } | | 8 | }
|
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 | 11 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (validator.isValid(entry.getEStructuralFeature())) | | 12 | if (validator.isValid(entry.getEStructuralFeature())) |
14 | if (object.equals(entry.getValue())) | | 13 | if (object.equals(entry.getValue())) |
15 | | | 14 | |
16 | | | 15 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |