anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE); anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE); if (anyType == null) { anyType = XMLTypePackage.eINSTANCE.getAnyType(); anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType(); }
anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE); anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE); if (anyType == null) { anyType = XMLTypePackage.eINSTANCE.getAnyType(); anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLHandler.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
Method name: void XMLHandler(XMLResource, XMLHelper, Map) Method name: void init(XMLResource, Map)
Number of AST nodes: 5 Number of AST nodes: 5
1
anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
1
anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
2
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
2
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
3
    if (anyType == null)
3
    if (anyType == null)
4
    {
4
    {
5
      anyType = XMLTypePackage.eINSTANCE.getAnyType();
5
      anyType = XMLTypePackage.eINSTANCE.getAnyType();
6
      anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType();
6
      anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType();
7
    }
7
    }
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.2
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    58
    anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
    58
    anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
    16
    anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
    Differences
    Expression1Expression2Difference
    VARIABLE_TYPE_MISMATCH
    java.util.Map<,>java.util.Map<,>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type of variable options.get(XMLResource.OPTION_ANY_TYPE) does not match with type of variable options.get(XMLResource.OPTION_ANY_TYPE)
    • Make classes and extend a common superclass
    Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options
    • Make classes java.util.Map<,> and java.util.Map<,> extend a common superclass
    16
    anyType = (EClass)options.get(XMLResource.OPTION_ANY_TYPE);
    59
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
    59
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
    17
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
    Differences
    Expression1Expression2Difference
    VARIABLE_TYPE_MISMATCH
    java.util.Map<,>java.util.Map<,>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type of variable options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) does not match with type of variable options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE)
    • Make classes and extend a common superclass
    Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options
    • Make classes java.util.Map<,> and java.util.Map<,> extend a common superclass
    17
    anySimpleType = (EClass)options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE);
    60
    if (anyType == null)
    18
    if (anyType == null)
    61
    anyType = XMLTypePackage.eINSTANCE.getAnyType();
    19
    anyType = XMLTypePackage.eINSTANCE.getAnyType();
    62
    anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType();
    20
    anySimpleType = XMLTypePackage.eINSTANCE.getSimpleAnyType();
    Precondition Violations (6)
    Row Violation
    1Type of variable options.get(XMLResource.OPTION_ANY_TYPE) does not match with type of variable options.get(XMLResource.OPTION_ANY_TYPE)
    2Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options
    3Expression options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type of variable options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE) does not match with type of variable options.get(XMLResource.OPTION_ANY_SIMPLE_TYPE)
    6Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options