EGenericType eTypeArgument1 = eTypeArguments1.get(i); EGenericType eTypeArgument2 = eTypeArguments2.get(i); if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions)) { return false; }
EGenericType eTypeArgument1 = eTypeArguments1.get(i); EGenericType eTypeArgument2 = eTypeArguments2.get(i); if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions)) { return false; }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreValidator.java
Method name: boolean matchingTypeArguments(EList, EList, Map) Method name: boolean equalTypeArguments(EList, EList, Map)
Number of AST nodes: 4 Number of AST nodes: 4
1
EGenericType eTypeArgument1 = eTypeArguments1.get(i);
1
EGenericType eTypeArgument1 = eTypeArguments1.get(i);
2
        EGenericType eTypeArgument2 = eTypeArguments2.get(i);
2
        EGenericType eTypeArgument2 = eTypeArguments2.get(i);
3
        if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions))
3
        if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions))
4
        {
4
        {
5
          return false;
5
          return false;
6
        }
6
        }
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 comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)8.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    EGenericType eTypeArgument1 = eTypeArguments1.get(i);
    5
    EGenericType eTypeArgument1 = eTypeArguments1.get(i);
    6
    EGenericType eTypeArgument2 = eTypeArguments2.get(i);
    6
    EGenericType eTypeArgument2 = eTypeArguments2.get(i);
    7
    if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions))
    7
    if (!isMatching(eTypeArgument1, eTypeArgument2, substitutions))
    7
    if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions))
    Differences
    Expression1Expression2Difference
    isMatchingequalTypeArgumentsMETHOD_INVOCATION_NAME_MISMATCH
    java.util.Map<,>java.util.Map<,>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression isMatching(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression equalTypeArguments(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.util.Map<,> of variable substitutions does not match with type java.util.Map<,> of variable substitutions
    • Make classes java.util.Map<,> and java.util.Map<,> extend a common superclass
    7
    if (!equalTypeArguments(eTypeArgument1, eTypeArgument2, substitutions))
    8
    return false;
    8
    return false;
    8
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    8
    return false;
    Precondition Violations (5)
    Row Violation
    1Expression isMatching(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression equalTypeArguments(eTypeArgument1,eTypeArgument2,substitutions) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type java.util.Map<,> of variable substitutions does not match with type java.util.Map<,> of variable substitutions
    4Conditional return false;
    5Conditional return false;