if (diagnostic.getSeverity() == Diagnostic.OK) { javaEGenericType = (EGenericType)diagnostic.getData().get(0); }
if (diagnostic.getSeverity() == Diagnostic.OK) { javaEGenericType = (EGenericType)diagnostic.getData().get(0); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java
Method name: void handleETypedElement(ETypedElement, String, String, String, String) Method name: void handleETypedElement(ETypedElement, String, String, String, String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (diagnostic.getSeverity() == Diagnostic.OK)
1
if (diagnostic.getSeverity() == Diagnostic.OK)
2
      {
2
      
3
  {
3
        javaEGenericType = (EGenericType)diagnostic.getData().get(0);
4
          javaEGenericType = (EGenericType)diagnostic.getData().get(0);
4
      }
5
        }
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.3
Clones locationClones are in the same method
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    43
    if (diagnostic.getSeverity() == Diagnostic.OK)
    107
    if (diagnostic.getSeverity() == Diagnostic.OK)
    44
    javaEGenericType = (EGenericType)diagnostic.getData().get(0);
    44
    javaEGenericType = (EGenericType)diagnostic.getData().get(0);
    108
    javaEGenericType = (EGenericType)diagnostic.getData().get(0);
    Differences
    Expression1Expression2Difference
    VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression diagnostic.getData().get(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression diagnostic.getData().get(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type of variable diagnostic.getData().get(0) does not match with type of variable diagnostic.getData().get(0)
    • Make classes and extend a common superclass
    108
    javaEGenericType = (EGenericType)diagnostic.getData().get(0);
    Precondition Violations (3)
    Row Violation
    1Expression diagnostic.getData().get(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression diagnostic.getData().get(0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type of variable diagnostic.getData().get(0) does not match with type of variable diagnostic.getData().get(0)