10246-1-2

String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation (langTypeEDataType, source, new String[] { "name", "lang_._type", "memberTypes", "http://www.eclipse.org/emf/2003/XMLType#language lang_._type_._member_._1" }); addAnnotation (langTypeNullEDataType, source, new String[] { "name", "lang_._type_._member_._1", "baseType", "http://www.eclipse.org/emf/2003/XMLType#string", "enumeration", "" }); addAnnotation (spaceTypeEEnum, source, new String[] { "name", "space_._type" }); addAnnotation (spaceTypeObjectEDataType, source, new String[] { "name", "space_._type:Object", "baseType", "space_._type" }); addAnnotation (xmlNamespaceDocumentRootEClass, source, new String[] { "name", "", "kind", "mixed" });
String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation (eBigDecimalEDataType, source, new String[] { "baseType", "http://www.w3.org/2001/XMLSchema#decimal" }); addAnnotation (eBigIntegerEDataType, source, new String[] { "baseType", "http://www.w3.org/2001/XMLSchema#integer" }); addAnnotation (eBooleanEDataType, source, new String[] { "baseType", "http://www.w3.org/2001/XMLSchema#boolean" }); addAnnotation (eBooleanObjectEDataType, source, new String[] { "baseType", "EBoolean", "name", "EBoolean:Object" }); addAnnotation (eByteEDataType, source, new String[] { "baseType", "http://www.w3.org/2001/XMLSchema#byte" });

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/namespace/impl/XMLNamespacePackageImpl.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/impl/EcorePackageImpl.java
Method name: `void createExtendedMetaDataAnnotations()` |  | Method name: `void createExtendedMetaDataAnnotations()`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";			↵

1

    String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";																					↵

2

        addAnnotation↵

2

        addAnnotation↵

3

          (langTypeEDataType, ↵

3

          (eBigDecimalEDataType, ↵

4

           source, ↵

4

           source, ↵

5

           new String[] ↵

5

           new String[] ↵

6

           {↵

6

           {↵

7

           "name", "lang_._type",↵

7

           "↵

8

           "memberTypes", "http://www.eclipse.org/emf/2003/XMLType#language lang_._type_._member_._1"↵

8

    baseType", "http://www.w3.org/2001/XMLSchema#decimal"↵

9

           });		↵

9

           });		↵

10

        addAnnotation↵

10

        addAnnotation↵

11

          (langTypeNullEDataType, ↵

11

          (eBigIntegerEDataType, ↵

12

           source, ↵

12

           source, ↵

13

           new String[] ↵

13

           new String[] ↵

14

           {↵

14

           {↵

15

           "name", "lang_._type_._member_._1",↵

16

           "baseType", "http://www.eclipse.org/emf/2003/XMLType#string",↵

15

           "baseType", "http://www.w3.org/2001/XML↵

17

           "enumeration", ""↵

16

    Schema#integer"↵

18

           });		↵

17

           });		↵

19

        addAnnotation↵

18

        addAnnotation↵

20

          (spaceTypeEEnum, ↵

19

          (eBooleanEDataType, ↵

21

           source, ↵

20

           source, ↵

22

           new String[] ↵

21

           new String[] ↵

23

           {↵

22

           {↵

24

           "name", "space_._type"↵

23

           "baseType", "http://www.w3.org/2001/XMLSchema#boolean"↵

25

           });		↵

24

           });		↵

26

        addAnnotation↵

25

        addAnnotation↵

27

          (spaceTypeObjectEDataType, ↵

26

          (eBooleanObjectEDataType, ↵

28

           source, ↵

27

           source, ↵

29

           new String[] ↵

28

           new String[] ↵

30

           {↵

29

           {↵

31

           "name", "space_._type:Object",↵

30

           "↵

32

           "baseType", "space_._type↵

31

    baseType", "EBoolean",↵

33

    "↵

32

           "name", "EBoolean:Object"↵

34

           });		↵

33

           });		↵

35

        addAnnotation↵

34

        addAnnotation↵

36

          (xmlNamespaceDocumentRootEClass, ↵

35

          (eByteEDataType, ↵

37

           source, ↵

36

           source, ↵

38

           new String[] ↵

37

           new String[] ↵

39

           {↵

38

           {↵

40

           "name", "",↵

39

           "↵

41

           "kind", "mixed"↵

40

    baseType", "http://www.w3.org/2001/XMLSchema#byte"↵

42

           });

41

           });

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 36

1. {Non-refactorable}

   Mapping Summary
   Number of mapped statements | 6
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 0.0
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   1

       String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";

   1

       String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";

   2

       addAnnotation(langTypeEDataType, source, new String[] {"name", "lang_._type", "memberTypes", "http://www.eclipse.org/emf/2003/XMLType#language lang_._type_._member_._1"});

   2 | addAnnotation(langTypeEDataType, source, new String[] {"name", "lang_._type", "memberTypes", "http://www.eclipse.org/emf/2003/XMLType#language lang_._type_._member_._1"});
   2 | addAnnotation(eBigDecimalEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#decimal"});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   langTypeEDataType | eBigDecimalEDataType | VARIABLE_NAME_MISMATCH
   {"name","lang_._type","memberTypes","http://www.eclipse.org/emf/2003/XMLType#language lang_._type_._member_._1"} | {"baseType","http://www.w3.org/2001/XMLSchema#decimal"} | ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH

   2

       addAnnotation(eBigDecimalEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#decimal"});

   3

       addAnnotation(langTypeNullEDataType, source, new String[] {"name", "lang_._type_._member_._1", "baseType", "http://www.eclipse.org/emf/2003/XMLType#string", "enumeration", ""});

   3 | addAnnotation(langTypeNullEDataType, source, new String[] {"name", "lang_._type_._member_._1", "baseType", "http://www.eclipse.org/emf/2003/XMLType#string", "enumeration", ""});
   3 | addAnnotation(eBigIntegerEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#integer"});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   langTypeNullEDataType | eBigIntegerEDataType | VARIABLE_NAME_MISMATCH
   {"name","lang_._type_._member_._1","baseType","http://www.eclipse.org/emf/2003/XMLType#string","enumeration",""} | {"baseType","http://www.w3.org/2001/XMLSchema#integer"} | ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH

   3

       addAnnotation(eBigIntegerEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#integer"});

   4

       addAnnotation(spaceTypeEEnum, source, new String[] {"name", "space_._type"});

   4 | addAnnotation(spaceTypeEEnum, source, new String[] {"name", "space_._type"});
   4 | addAnnotation(eBooleanEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#boolean"});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   spaceTypeEEnum | eBooleanEDataType | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EEnum | org.eclipse.emf.ecore.EDataType | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EEnum of variable spaceTypeEEnum does not match with type org.eclipse.emf.ecore.EDataType of variable eBooleanEDataType
   - Make classes org.eclipse.emf.ecore.EEnum and org.eclipse.emf.ecore.EDataType extend a common superclass

   4

       addAnnotation(eBooleanEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#boolean"});

   5

       addAnnotation(spaceTypeObjectEDataType, source, new String[] {"name", "space_._type:Object", "baseType", "space_._type"});

   5 | addAnnotation(spaceTypeObjectEDataType, source, new String[] {"name", "space_._type:Object", "baseType", "space_._type"});
   6 | addAnnotation(eByteEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#byte"});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   spaceTypeObjectEDataType | eByteEDataType | VARIABLE_NAME_MISMATCH
   {"name","space_._type:Object","baseType","space_._type"} | {"baseType","http://www.w3.org/2001/XMLSchema#byte"} | ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH

   6

       addAnnotation(eByteEDataType, source, new String[] {"baseType", "http://www.w3.org/2001/XMLSchema#byte"});

   6

       addAnnotation(xmlNamespaceDocumentRootEClass, source, new String[] {"name", "", "kind", "mixed"});

   6 | addAnnotation(xmlNamespaceDocumentRootEClass, source, new String[] {"name", "", "kind", "mixed"});
   5 | addAnnotation(eBooleanObjectEDataType, source, new String[] {"baseType", "EBoolean", "name", "EBoolean:Object"});

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   xmlNamespaceDocumentRootEClass | eBooleanObjectEDataType | VARIABLE_NAME_MISMATCH
   org.eclipse.emf.ecore.EClass | org.eclipse.emf.ecore.EDataType | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.eclipse.emf.ecore.EClass of variable xmlNamespaceDocumentRootEClass does not match with type org.eclipse.emf.ecore.EDataType of variable eBooleanObjectEDataType
   - Make classes org.eclipse.emf.ecore.EClass and org.eclipse.emf.ecore.EDataType extend a common superclass

   5

       addAnnotation(eBooleanObjectEDataType, source, new String[] {"baseType", "EBoolean", "name", "EBoolean:Object"});

   Precondition Violations (2)
   Row | Violation
   --- | ---
   1 | Type org.eclipse.emf.ecore.EEnum of variable spaceTypeEEnum does not match with type org.eclipse.emf.ecore.EDataType of variable eBooleanEDataType
   2 | Type org.eclipse.emf.ecore.EClass of variable xmlNamespaceDocumentRootEClass does not match with type org.eclipse.emf.ecore.EDataType of variable eBooleanObjectEDataType