if (isUnsettable())
{
if (isResolveProxies())
{
settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this);
}
else
{
settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this);
}
}
else
{
if (isResolveProxies())
{
settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this);
}
else
{
settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this);
}
}
if (eOpposite == null)
{
if (isUnsettable())
{
settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);
}
else
{
settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);
}
}
else
{
if (isUnsettable())
{
settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);
}
else
{
settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);
}
}
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: EStructuralFeature.Internal.SettingDelegate getSettingDelegate()
|
|
Method name: EStructuralFeature.Internal.SettingDelegate getSettingDelegate()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (isUnsettable())↵ | | 1 | if (↵
|
2 | ↵ | | 2 | eOpposite == null)↵
|
3 | {↵ | | 3 | {↵
|
4 | if (isResolveProxies())↵ | | 4 | if (isUnsettable())↵
|
5 | {↵ | | 5 | ↵
|
6 | ↵ | | 6 | {↵
|
7 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this);↵ | | 7 | settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this);↵
|
8 | }↵ | | 8 | ↵
|
9 | ↵ | | 9 | }↵
|
10 | else↵ | | 10 | else↵
|
11 | {↵ | | 11 | ↵
|
12 | ↵ | | 12 | {↵
|
13 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this);↵ | | 13 | settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this);↵
|
14 | }↵ | | 14 | ↵
|
15 | ↵ | | 15 | }↵
|
16 | }↵ | | 16 | }↵
|
17 | else↵ | | 17 | else↵
|
18 | {↵ | | 18 | {↵
|
19 | if (isResolveProxies())↵ | | 19 | if (isUnsettable())↵
|
20 | {↵ | | 20 | ↵
|
21 | ↵ | | 21 | {↵
|
22 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this);↵ | | 22 | settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable((EClass)eType, this, eOpposite);↵
|
23 | }↵ | | 23 | }↵
|
24 | else↵ | | 24 | else↵
|
25 | {↵ | | 25 | ↵
|
26 | ↵ | | 26 | {↵
|
27 | settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this);↵ | | 27 | settingDelegate = new InternalSettingDelegateSingleEObjectResolvingWithInverse((EClass)eType, this, eOpposite);↵
|
28 | }↵ | | 28 | ↵
|
29 | ↵ | | 29 | }↵
|
30 | } | | 30 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 2 |
Number of refactorable cases | 2 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 21 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
131 | if (isResolveProxies()) | | 146 | if (isUnsettable()) |
132 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettableResolving((EClass)eType, this); | | 147 | settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this); |
| | | | |
133 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentUnsettable((EClass)eType, this); | | 148 | settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this); |
Precondition Violations (0)
Row |
Violation |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
134 | if (isResolveProxies()) | | 146 | if (isUnsettable()) |
135 | settingDelegate = new InternalSettingDelegateSingleEObjectContainmentResolving((EClass)eType, this); | | 147 | settingDelegate = new InternalSettingDelegateSingleEObjectResolvingUnsettable((EClass)eType, this); |
| | | | |
136 | settingDelegate = new InternalSettingDelegateSingleEObjectContainment((EClass)eType, this); | | 148 | settingDelegate = new InternalSettingDelegateSingleEObjectResolving((EClass)eType, this); |
Precondition Violations (0)
Row |
Violation |