quid = quid.substring(1, quid.length() - 1); TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid); if (tableObj != null) { roseUtil.typeTable.put(eParameter, tableObj.getName()); } else { warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object []{ quid, eParameter.getEOperation().getName() })); roseUtil.typeTable.put(eParameter, "EObject"); }
quid = quid.substring(1, quid.length() - 1); TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid); if (tableObj != null) { roseUtil.typeTable.put(eOperation, tableObj.getName()); } else { warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object []{ quid, eOperation.getName() })); roseUtil.typeTable.put(eOperation, "EString"); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/builder/RoseEcoreBuilder.java File path: /emf-2.4.1/src/org/eclipse/emf/importer/rose/builder/RoseEcoreBuilder.java
Method name: void setEParameterProperties(RoseNode, EParameter) Method name: void setResultType(RoseNode, EOperation)
Number of AST nodes: 6 Number of AST nodes: 6
1
quid = quid.substring(1, quid.length() - 1);
1
quid = quid.substring(1, quid.length() - 1);
2
      TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid);
2
      TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid);
3
      if (tableObj != null)
3
      if (tableObj != null)
4
      {
4
      {
5
        roseUtil.typeTable.put(eParameter, tableObj.getName());
5
        roseUtil.typeTable.put(eOperation, tableObj.getName());
6
      }
6
      }
7
      else
7
      else
8
      {
8
      {
9
        warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object []{
9
        warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object []{
10
          quid,
11
          eParameter.getEOperation().getName() }));
10
 quid, eOperation.getName() }));
12
        roseUtil.typeTable.put(eParameter, "EObject");
11
        roseUtil.typeTable.put(eOperation, "EString");
13
      }
12
      }
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 comparisons21
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)10.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    quid = quid.substring(1, quid.length() - 1);
    3
    quid = quid.substring(1, quid.length() - 1);
    5
    TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid);
    4
    TableObject tableObj = (TableObject)roseUtil.quidTable.get(quid);
    6
    if (tableObj != null)
    5
    if (tableObj != null)
    7
    roseUtil.typeTable.put(eParameter, tableObj.getName());
    7
    roseUtil.typeTable.put(eParameter, tableObj.getName());
    6
    roseUtil.typeTable.put(eOperation, tableObj.getName());
    Differences
    Expression1Expression2Difference
    eParametereOperationVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EParameterorg.eclipse.emf.ecore.EOperationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    • Make classes org.eclipse.emf.ecore.EParameter and org.eclipse.emf.ecore.EOperation extend a common superclass
    6
    roseUtil.typeTable.put(eOperation, tableObj.getName());
    else
    else
    8
    warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object[] {quid, eParameter.getEOperation().getName()}));
    8
    warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object[] {quid, eParameter.getEOperation().getName()}));
    7
    warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object[] {quid, eOperation.getName()}));
    Differences
    Expression1Expression2Difference
    eParameter.getEOperation()eOperationTYPE_COMPATIBLE_REPLACEMENT
    7
    warning(RoseImporterPlugin.INSTANCE.getString("_UI_UnresolvedTypeIDFor_message", new Object[] {quid, eOperation.getName()}));
    9
    roseUtil.typeTable.put(eParameter, "EObject");
    9
    roseUtil.typeTable.put(eParameter, "EObject");
    8
    roseUtil.typeTable.put(eOperation, "EString");
    Differences
    Expression1Expression2Difference
    eParametereOperationVARIABLE_NAME_MISMATCH
    org.eclipse.emf.ecore.EParameterorg.eclipse.emf.ecore.EOperationVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    • Make classes org.eclipse.emf.ecore.EParameter and org.eclipse.emf.ecore.EOperation extend a common superclass
    8
    roseUtil.typeTable.put(eOperation, "EString");
    Precondition Violations (2)
    Row Violation
    1Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation
    2Type org.eclipse.emf.ecore.EParameter of variable eParameter does not match with type org.eclipse.emf.ecore.EOperation of variable eOperation