if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addChangeablePropertyDescriptor(object); addVolatilePropertyDescriptor(object); addTransientPropertyDescriptor(object); addDefaultValueLiteralPropertyDescriptor(object); addDefaultValuePropertyDescriptor(object); addUnsettablePropertyDescriptor(object); addDerivedPropertyDescriptor(object); addEContainingClassPropertyDescriptor(object); } return itemPropertyDescriptors;
if (mixed == null) { mixed = new BasicFeatureMap(this, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED); } return mixed;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EStructuralFeatureItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/impl/XMLNamespaceDocumentRootImpl.java
Method name: List getPropertyDescriptors(Object) Method name: FeatureMap getMixed()
Number of AST nodes: 11 Number of AST nodes: 3
1
if (itemPropertyDescriptors == null)
1
if (
2
    {
3
      super.getPropertyDescriptors(object);
4
      addChangeablePropertyDescriptor(object);
5
      addVolatilePropertyDescriptor(object);
6
      addTransientPropertyDescriptor(object);
7
      addDefaultValueLiteralPropertyDescriptor(object);
8
      addDefaultValuePropertyDescriptor(object);
9
      addUnsettablePropertyDescriptor(object);
10
      addDerivedPropertyDescriptor(object);
11
      addEContainingClassPropertyDescriptor(object);
12
    }
13
    return itemPropertyDescriptors
2
mixed == null)
3
    {
4
      mixed = new BasicFeatureMap(this, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED);
5
    }
14
;
6
    return mixed;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons21
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment10
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (itemPropertyDescriptors == null)
    1
    if (itemPropertyDescriptors == null)
    1
    if (mixed == null)
    Differences
    Expression1Expression2Difference
    itemPropertyDescriptorsmixedVARIABLE_NAME_MISMATCH
    java.util.Listorg.eclipse.emf.ecore.util.FeatureMapVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type org.eclipse.emf.ecore.util.FeatureMap of variable mixed
    • Make classes java.util.List and org.eclipse.emf.ecore.util.FeatureMap extend a common superclass
    1
    if (mixed == null)
                                                                                                                                                                                        
    2
    mixed = new BasicFeatureMap(this, XMLNamespacePackage.XML_NAMESPACE_DOCUMENT_ROOT__MIXED);
    2
    super.getPropertyDescriptors(object);
                                                                                    
    3
    addChangeablePropertyDescriptor(object);
                                                                                          
    4
    addVolatilePropertyDescriptor(object);
                                                                                      
    5
    addTransientPropertyDescriptor(object);
                                                                                        
    6
    addDefaultValueLiteralPropertyDescriptor(object);
                                                                                                            
    7
    addDefaultValuePropertyDescriptor(object);
                                                                                              
    8
    addUnsettablePropertyDescriptor(object);
                                                                                          
    9
    addDerivedPropertyDescriptor(object);
                                                                                    
    10
    addEContainingClassPropertyDescriptor(object);
                                                                                                        
                                    
    3
    return mixed;
    Preondition Violations
    Unmatched return mixed;
    3
    return mixed;
    11
    return itemPropertyDescriptors;
    11
    return itemPropertyDescriptors;
    Preondition Violations
    Unmatched return itemPropertyDescriptors;
                                                                          
    Precondition Violations (3)
    Row Violation
    1Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type org.eclipse.emf.ecore.util.FeatureMap of variable mixed
    2Unmatched return mixed;
    3Unmatched return itemPropertyDescriptors;