if (topLabelSeparatorAll.length > 0) { String sep = topLabelSeparatorAll[0].getAttribute("value"); if (sep.length() > 0) { topLabelSeparator = sep.charAt(0); } }
if (bottomLabelSeparatorAll.length > 0) { String sep = bottomLabelSeparatorAll[0].getAttribute("value"); if (sep.length() > 0) { bottomLabelSeparator = sep.charAt(0); } }
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
if (topLabelSeparatorAll.length > 0) 
1
if (bottomLabelSeparatorAll.length > 0) 
2
          {
2
          {
3
            String sep =  topLabelSeparatorAll[0].getAttribute("value");
3
            String sep =  bottomLabelSeparatorAll[0].getAttribute("value");
4
            if (sep.length() > 0) 
4
            if (sep.length() > 0) 
5
            {
5
            {
6
              topLabelSeparator = sep.charAt(0);
6
              bottomLabelSeparator = sep.charAt(0);
7
            }
7
            }
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.4
Clones locationClones are in the same method
Number of node comparisons10
  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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    18
    if (topLabelSeparatorAll.length > 0)
    18
    if (topLabelSeparatorAll.length > 0)
    23
    if (bottomLabelSeparatorAll.length > 0)
    Differences
    Expression1Expression2Difference
    topLabelSeparatorAllbottomLabelSeparatorAllVARIABLE_NAME_MISMATCH
    23
    if (bottomLabelSeparatorAll.length > 0)
    19
    String sep = topLabelSeparatorAll[0].getAttribute("value");
    19
    String sep = topLabelSeparatorAll[0].getAttribute("value");
    24
    String sep = bottomLabelSeparatorAll[0].getAttribute("value");
    Differences
    Expression1Expression2Difference
    topLabelSeparatorAllbottomLabelSeparatorAllVARIABLE_NAME_MISMATCH
    24
    String sep = bottomLabelSeparatorAll[0].getAttribute("value");
    20
    if (sep.length() > 0)
    25
    if (sep.length() > 0)
    21
    topLabelSeparator = sep.charAt(0);
    21
    topLabelSeparator = sep.charAt(0);
    26
    bottomLabelSeparator = sep.charAt(0);
    Differences
    Expression1Expression2Difference
    topLabelSeparatorbottomLabelSeparatorVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression topLabelSeparator is a field being modified, and thus it cannot be parameterized
    Expression bottomLabelSeparator is a field being modified, and thus it cannot be parameterized
    26
    bottomLabelSeparator = sep.charAt(0);
    Precondition Violations (2)
    Row Violation
    1Expression topLabelSeparator is a field being modified, and thus it cannot be parameterized
    2Expression bottomLabelSeparator is a field being modified, and thus it cannot be parameterized