IConfigurationElement labelForm[] = topLabelForms[j].getChildren("label-form"); for (int k=0; k < labelForm.length; k++) { topLabelLongForms.add(labelForm[k].getAttribute("long")); topLabelShortForms.add(labelForm[k].getAttribute("short")); }
IConfigurationElement labelForm[] = bottomLabelForms[j].getChildren("label-form"); for (int k=0; k < labelForm.length; k++) { bottomLabelLongForms.add(labelForm[k].getAttribute("long")); bottomLabelShortForms.add(labelForm[k].getAttribute("short")); }
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/domain/PluginAdapterFactoryMappingDomain.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/domain/PluginAdapterFactoryMappingDomain.java
Method name: void initializeFromPlugin(String) Method name: void initializeFromPlugin(String)
Number of AST nodes: 4 Number of AST nodes: 4
1
IConfigurationElement labelForm[] = topLabelForms[j].getChildren("label-form");
1
IConfigurationElement labelForm[] = bottomLabelForms[j].getChildren("label-form");
2
            for (int k=0; k < labelForm.length; k++) 
2
            for (int k=0; k < labelForm.length; k++) 
3
            {
3
            {
4
              topLabelLongForms.add(labelForm[k].getAttribute("long"));
4
              bottomLabelLongForms.add(labelForm[k].getAttribute("long"));
5
              topLabelShortForms.add(labelForm[k].getAttribute("short"));
5
              bottomLabelShortForms.add(labelForm[k].getAttribute("short"));
6
            }
6
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in the same method
Number of node comparisons13
  1. {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)3.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    47
    IConfigurationElement labelForm[] = topLabelForms[j].getChildren("label-form");
    47
    IConfigurationElement labelForm[] = topLabelForms[j].getChildren("label-form");
    53
    IConfigurationElement labelForm[] = bottomLabelForms[j].getChildren("label-form");
    Differences
    Expression1Expression2Difference
    topLabelFormsbottomLabelFormsVARIABLE_NAME_MISMATCH
    53
    IConfigurationElement labelForm[] = bottomLabelForms[j].getChildren("label-form");
    48
    for (int k = 0; k < labelForm.length; k++)
    54
    for (int k = 0; k < labelForm.length; k++)
    49
    topLabelLongForms.add(labelForm[k].getAttribute("long"));
    49
    topLabelLongForms.add(labelForm[k].getAttribute("long"));
    55
    bottomLabelLongForms.add(labelForm[k].getAttribute("long"));
    Differences
    Expression1Expression2Difference
    topLabelLongFormsbottomLabelLongFormsVARIABLE_NAME_MISMATCH
    55
    bottomLabelLongForms.add(labelForm[k].getAttribute("long"));
    50
    topLabelShortForms.add(labelForm[k].getAttribute("short"));
    50
    topLabelShortForms.add(labelForm[k].getAttribute("short"));
    56
    bottomLabelShortForms.add(labelForm[k].getAttribute("short"));
    Differences
    Expression1Expression2Difference
    topLabelShortFormsbottomLabelShortFormsVARIABLE_NAME_MISMATCH
    56
    bottomLabelShortForms.add(labelForm[k].getAttribute("short"));
    Precondition Violations (0)
    Row Violation