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> allElements = getAllElements(eClass);
for (int i = 0, size = allElements.size(); i < size; ++i)
{
EStructuralFeature result = allElements.get(i);
if (matches(getWildcards(result), namespace))
{
return result;
}
}
return null;
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/util/BasicExtendedMetaData.java
|
Method name: EAttribute getMixedFeature(EClass)
|
|
Method name: EStructuralFeature getElementWildcardAffiliation(EClass, String, String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | List<EAttribute> eAllAttributes = eClass.getEAllAttributes();↵ | | 1 | List<EStructuralFeature> allElements = getAll↵
|
2 | ↵ | | 2 | Elements(eClass);↵
|
3 | for (int i = 0, size = eAllAttributes.size(); i < size; ++i)↵ | | 3 | for (int i = 0, size = allElements.size(); i < size; ++i)↵
|
4 | {↵ | | 4 | {↵
|
5 | EAttribute eAttribute = eAllAttributes.get(i);↵ | | 5 | ↵
|
6 | if (getFeatureKind(eAttribute) == ExtendedMetaData.ELEMENT_WILDCARD_FEATURE)↵ | | |
|
7 | ↵ | | 6 | EStructuralFeature result = allElements.get(i);↵
|
| | | 7 | if (matches(getWildcards(result), namespace))↵
|
8 | {↵ | | 8 | {↵
|
9 | return eAttribute;↵ | | 9 | return result;↵
|
10 | }↵ | | 10 | }↵
|
11 | }↵ | | 11 | ↵
|
12 | ↵ | | 12 | }↵
|
|
13 | break; | | 13 | return null;
|
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 declared in the same class |
Number of node comparisons | 1 |