List<EAttribute> eAllAttributes = eClass.getEAllAttributes();
for (int i = 0, size = eAllAttributes.size(); i < size; ++i)
{
EAttribute eAttribute = eAllAttributes.get(i);
if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE)
{
return eAttribute;
}
}
break;
List<EStructuralFeature> structuralFeatures = eClass.getEAllStructuralFeatures();
for (int i = 0, size = structuralFeatures.size(); i < size; ++i)
{
EStructuralFeature eStructuralFeature = structuralFeatures.get(i);
if (name.equals(extendedMetaData.getName(eStructuralFeature))
&& (namespaceURI == null ? extendedMetaData.getNamespace(eStructuralFeature) == null : namespaceURI.equals(extendedMetaData.getNamespace(eStructuralFeature))))
{
return eStructuralFeature;
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHelperImpl.java
|
Method name: EAttribute getMixedFeature(EClass)
|
|
Method name: EStructuralFeature getFeature(EClass, String, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | List<EAttribute> eAllAttributes = eClass.getEAllAttributes();↵ | | 1 | List<EStructuralFeature> structuralFeatures = eClass.getEAllStructuralFeatures();↵
|
2 | for (int i = 0, size = eAllAttributes.size(); i < size; ++i)↵ | | 2 | for (int i = 0, size = structuralFeatures.size(); i < size; ++i)↵
|
3 | {↵ | | 3 | {↵
|
4 | EAttribute eAttribute = eAllAttributes.get(i);↵ | | 4 | E↵
|
5 | if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE↵ | | 5 | StructuralFeature eStructuralFeature = structuralFeatures.get(i);↵
|
| | | 6 | if (name.equals(extendedMetaData.getName(eStructuralFeature))↵
|
6 | )↵ | | 7 | && (namespaceURI == null ? extendedMetaData.getNamespace(eStructuralFeature) == null : namespaceURI.equals(extendedMetaData.getNamespace(eStructuralFeature))))↵
|
7 | {↵ | | 8 | {↵
|
8 | return eAttribute;↵ | | 9 | return eStructuralFeature;↵
|
9 | }↵ | | 10 | }↵
|
10 | }↵ | | 11 | }
|
11 | break; | | | |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |