if (WHITE_SPACE_KINDS[i].equals(whiteSpaceLiteral)) { return i; }
if (CONTENT_KINDS[i].equals(kind)) { return i; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: int basicGetWhiteSpaceFacet(EDataType) Method name: int basicGetContentKind(EClass)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (WHITE_SPACE_KINDS[i].equals(whiteSpaceLiteral))
1
if (CONTENT_KINDS[i].equals(kind))
2
        {
2
        
3
  {
3
          return i;
4
            return i;
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 declared in the same class
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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (WHITE_SPACE_KINDS[i].equals(whiteSpaceLiteral))
    5
    if (WHITE_SPACE_KINDS[i].equals(whiteSpaceLiteral))
    6
    if (CONTENT_KINDS[i].equals(kind))
    Differences
    Expression1Expression2Difference
    whiteSpaceLiteralkindVARIABLE_NAME_MISMATCH
    java.lang.Stringjava.lang.ObjectVARIABLE_TYPE_MISMATCH
    WHITE_SPACE_KINDSCONTENT_KINDSVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type java.lang.String of variable whiteSpaceLiteral does not match with type java.lang.Object of variable kind
    • Make classes java.lang.String and java.lang.Object extend a common superclass
    6
    if (CONTENT_KINDS[i].equals(kind))
    6
    return i;
    7
    return i;
    Precondition Violations (1)
    Row Violation
    1Type java.lang.String of variable whiteSpaceLiteral does not match with type java.lang.Object of variable kind