if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addKeyPropertyDescriptor(object); addValuePropertyDescriptor(object); } return itemPropertyDescriptors;
if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS); } return childrenFeatures;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EStringToStringMapEntryItemProvider.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EClassifierItemProvider.java
Method name: List getPropertyDescriptors(Object) Method name: Collection getChildrenFeatures(Object)
Number of AST nodes: 5 Number of AST nodes: 4
1
if (itemPropertyDescriptors == null)
1
if (childrenFeatures == null)
2
    {
2
    {
3
      super.getPropertyDescriptors(object);
3
      super.getChildrenFeatures(object);
4
      addKeyPropertyDescriptor(object);
4
      
5
      addValuePropertyDescriptor(object);
6
    }
7
    return itemPropertyDescriptor
5
childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
6
    }
8
s;
7
    return childrenFeatures;
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 having the same super class
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (itemPropertyDescriptors == null)
    1
    if (itemPropertyDescriptors == null)
    1
    if (childrenFeatures == null)
    Differences
    Expression1Expression2Difference
    itemPropertyDescriptorschildrenFeaturesVARIABLE_NAME_MISMATCH
    java.util.Listjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.List<org.eclipse.emf.edit.provider.IItemPropertyDescriptor> of variable itemPropertyDescriptors does not match with type java.util.List<org.eclipse.emf.ecore.EStructuralFeature> of variable childrenFeatures
    • Make classes java.util.List and java.util.List extend a common superclass
    1
    if (childrenFeatures == null)
                                                                              
    2
    super.getChildrenFeatures(object);
    2
    super.getPropertyDescriptors(object);
                                                                                    
                                                                                                                                                              
    3
    childrenFeatures.add(EcorePackage.Literals.ECLASSIFIER__ETYPE_PARAMETERS);
    3
    addKeyPropertyDescriptor(object);
                                                                            
    4
    addValuePropertyDescriptor(object);
                                                                                
                                                          
    4
    return childrenFeatures;
    Preondition Violations
    Unmatched return childrenFeatures;
    4
    return childrenFeatures;
    5
    return itemPropertyDescriptors;
    5
    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 java.util.List<org.eclipse.emf.ecore.EStructuralFeature> of variable childrenFeatures
    2Unmatched return childrenFeatures;
    3Unmatched return itemPropertyDescriptors;