Object setting = settings.dynamicGet(index);
if (setting == null)
{
return false;
}
else
{
return ((EStructuralFeature.Setting)setting).isSet();
}
Object setting = settings.dynamicGet(index);
if (setting == null)
{
return false;
}
else
{
return true;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EStructuralFeatureImpl.java
|
Method name: boolean dynamicIsSet(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int)
|
|
Method name: boolean dynamicIsSet(InternalEObject, EStructuralFeature.Internal.DynamicValueHolder, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | Object setting = settings.dynamicGet(index);↵ | | 1 | Object setting = settings.dynamicGet(index);↵
|
2 | if (setting == null)↵ | | 2 | if (setting == null)↵
|
3 | {↵ | | 3 | {↵
|
4 | return false;↵ | | 4 | return false;↵
|
5 | }↵ | | 5 | }↵
|
6 | else ↵ | | 6 | else↵
|
7 | {↵ | | 7 | {↵
|
8 | return ((EStructuralFeature.Setting)setting).isSet();↵ | | 8 | return true;↵
|
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.1 |
Clones location | Clones are in the same java file |
Number of node comparisons | 10 |
-
{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.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Object setting = settings.dynamicGet(index); | | 1 | Object setting = settings.dynamicGet(index); |
2 | if (setting == null) | | 2 | if (setting == null) |
3 | | | 3 | |
| | | | |
4 | return ((EStructuralFeature.Setting)setting).isSet(); | | 4 | |
Precondition Violations (1)
Row |
Violation |
1 | Expression ((EStructuralFeature.Setting)setting).isSet() cannot be parameterized, because it has dependencies to/from statements that will be extracted |