EClass documentRootEClass = ExtendedMetaData.INSTANCE.getDocumentRoot(ePackage); if (documentRootEClass != null) { for (EStructuralFeature otherFeature : documentRootEClass.getEAllStructuralFeatures()) { if (otherFeature != feature && otherFeature.isDerived() && otherFeature.isChangeable() && ExtendedMetaData.INSTANCE.getAffiliation(eClass, otherFeature) == feature) { delegated.add(otherFeature); } } }
EClass documentRootEClass = ExtendedMetaData.INSTANCE.getDocumentRoot(ePackage); if (documentRootEClass != null) { for (EStructuralFeature otherFeature : documentRootEClass.getEAllStructuralFeatures()) { if (otherFeature != feature && otherFeature.isChangeable() && otherFeature.isDerived() && allDelegated.contains(ExtendedMetaData.INSTANCE.getAffiliation(eClass, otherFeature)) && qNames.add (ExtendedMetaData.INSTANCE.getNamespace(otherFeature) + "#" + ExtendedMetaData.INSTANCE.getName(otherFeature))) { delegated.add(otherFeature); } } }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/edit/provider/ReflectiveItemProvider.java
Method name: List getAllDelegatedFeatures(EStructuralFeature) Method name: List getAllDelegatedFeatures(EStructuralFeature)
Number of AST nodes: 5 Number of AST nodes: 5
1
EClass documentRootEClass = ExtendedMetaData.INSTANCE.getDocumentRoot(ePackage);
1
EClass documentRootEClass = ExtendedMetaData.INSTANCE.getDocumentRoot(ePackage);
2
            if (documentRootEClass != null)
2
            if (documentRootEClass != null)
3
            {
3
            {
4
              for (EStructuralFeature otherFeature : documentRootEClass.getEAllStructuralFeatures())
4
              for (EStructuralFeature otherFeature : documentRootEClass.getEAllStructuralFeatures())
5
              {
5
              {
6
                if (otherFeature != feature && 
6
                if (otherFeature != feature && 
7
                      otherFeature.isDerived() && 
7
                      otherFeature.isChangeable() &&
8
                      otherFeature.isChangeable() &&
8
                      otherFeature.isDerived() &&
9
                      ExtendedMetaData.INSTANCE.getAffiliation(eClass, otherFeature) == f
9
                      allDelegated.contains(ExtendedMetaData.INSTANCE.getAffiliation(eClass, otherFeature))  &&
10
                      qNames.add
11
                        (ExtendedMetaData.INSTANCE.getNamespace(otherFeature) + "#" + 
10
eature)
12
                           ExtendedMetaData.INSTANCE.getName(otherFeature)))
11
                {
13
                {
12
                  delegated.add(otherFeature);
14
                  delegated.add(otherFeature);
13
                }
15
                }
14
              }
16
              }
15
            }
17
            }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in the same method
Number of node comparisons1