if (validator.isValid(entry.getEStructuralFeature()))
{
if (entry.getValue() == null)
{
remove(i);
return true;
}
}
if (validator.isValid(entry.getEStructuralFeature()))
{
if (entry.getValue() == null)
{
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 (entry.getValue() == null)↵ | | 3 | if (entry.getValue() == null)↵
|
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 |
19 | if (validator.isValid(entry.getEStructuralFeature())) | | 18 | if (validator.isValid(entry.getEStructuralFeature())) |
20 | if (entry.getValue() == null) | | 19 | if (entry.getValue() == null) |
21 | | | 20 | |
22 | | | 21 | |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return true; |
2 | Conditional return true; |