EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(name);
if (eStructuralFeature instanceof EAttribute)
{
return (EAttribute)eStructuralFeature;
}
throw new IllegalArgumentException("The feature '" + name + "' is not a valid attribute");
Object adapter = adapters.get(i);
if (adapter instanceof ECrossReferenceAdapter)
{
return (ECrossReferenceAdapter)adapter;
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/BasicEObjectImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/ECrossReferenceAdapter.java
|
Method name: EAttribute eAttribute(EClass, String)
|
|
Method name: ECrossReferenceAdapter getCrossReferenceAdapter(Notifier)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(name);↵ | | 1 | Object adapter = adapters.get(i);↵
|
2 | if (eStructuralFeature instanceof EAttribute)↵ | | 2 | if (adapter instanceof ECrossReferenceAdapter)↵
|
3 | {↵ | | 3 | {↵
|
4 | return (EAttribute)eStructuralFeature;↵ | | 4 | return (E↵
|
5 | }↵ | | |
|
6 | throw new IllegalArgumentException("The feature '" + name + "' is not a valid attribute"); | | 5 | CrossReferenceAdapter)adapter;↵
|
| | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |