if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty()) { return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_label"); } else { return super.getLabel(); }
if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty()) { return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_description"); } else { return super.getDescription(); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/CreateMappingCommand.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/command/CreateMappingCommand.java
Method name: String getLabel() Method name: String getDescription()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (inputs == null  || inputs.isEmpty() || outputs == null || outputs.isEmpty())
1
if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty())
2
    {
2
    {
3
      return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_label");
3
      return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_description");
4
    }
4
    }
5
    else
5
    else
6
    {
6
    {
7
      return super.getLabel();
7
      return super.getDescription();
8
    }
8
    }
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 statements3
    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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty())
    1
    if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty())
    1
    if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty())
    Differences
    Expression1Expression2Difference
    java.util.Collection<>java.util.Collection<>VARIABLE_TYPE_MISMATCH
    java.util.Collection<>java.util.Collection<>VARIABLE_TYPE_MISMATCH
    java.util.Collection<>java.util.Collection<>VARIABLE_TYPE_MISMATCH
    java.util.Collection<>java.util.Collection<>VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Collection<> of variable inputs does not match with type java.util.Collection<> of variable inputs
    • Make classes java.util.Collection<> and java.util.Collection<> extend a common superclass
    Type java.util.Collection<> of variable inputs does not match with type java.util.Collection<> of variable inputs
    • Make classes java.util.Collection<> and java.util.Collection<> extend a common superclass
    Type java.util.Collection<> of variable outputs does not match with type java.util.Collection<> of variable outputs
    • Make classes java.util.Collection<> and java.util.Collection<> extend a common superclass
    Type java.util.Collection<> of variable outputs does not match with type java.util.Collection<> of variable outputs
    • Make classes java.util.Collection<> and java.util.Collection<> extend a common superclass
    1
    if (inputs == null || inputs.isEmpty() || outputs == null || outputs.isEmpty())
    2
    return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_label");
    2
    return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_label");
    2
    return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_description");
    Differences
    Expression1Expression2Difference
    "_UI_CreateMappingCommand_onesided_label""_UI_CreateMappingCommand_onesided_description"LITERAL_VALUE_MISMATCH
    2
    return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_description");
    else
    else
    3
    return super.getLabel();
    3
    return super.getLabel();
    3
    return super.getDescription();
    Differences
    Expression1Expression2Difference
    getLabelgetDescriptionMETHOD_INVOCATION_NAME_MISMATCH
    3
    return super.getDescription();
    Precondition Violations (4)
    Row Violation
    1Type java.util.Collection<> of variable inputs does not match with type java.util.Collection<> of variable inputs
    2Type java.util.Collection<> of variable inputs does not match with type java.util.Collection<> of variable inputs
    3Type java.util.Collection<> of variable outputs does not match with type java.util.Collection<> of variable outputs
    4Type java.util.Collection<> of variable outputs does not match with type java.util.Collection<> of variable outputs