String labelCase = topLabelCaseAll[0].getAttribute("value"); if (labelCase.equalsIgnoreCase("upper")) { topLabelCase = LABEL_UPPER; } else if (labelCase.equalsIgnoreCase("lower")) { topLabelCase = LABEL_LOWER; } else if (labelCase.equalsIgnoreCase("mixed")) { topLabelCase = LABEL_MIXED; }
String labelCase = bottomLabelCaseAll[0].getAttribute("value"); if (labelCase.equalsIgnoreCase("upper")) { bottomLabelCase = LABEL_UPPER; } else if (labelCase.equalsIgnoreCase("lower")) { bottomLabelCase = LABEL_LOWER; } else if (labelCase.equalsIgnoreCase("mixed")) { bottomLabelCase = LABEL_MIXED; }
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: 7 Number of AST nodes: 7
1
String labelCase =  topLabelCaseAll[0].getAttribute("value");
1
String labelCase =  bottomLabelCaseAll[0].getAttribute("value");
2
            if (labelCase.equalsIgnoreCase("upper")) 
2
            if (labelCase.equalsIgnoreCase("upper")) 
3
            {
3
            {
4
              topLabelCase = LABEL_UPPER;
4
              bottomLabelCase = LABEL_UPPER;
5
            }
5
            }
6
            else if (labelCase.equalsIgnoreCase("lower")) 
6
            else if (labelCase.equalsIgnoreCase("lower")) 
7
            {
7
            {
8
              topLabelCase = LABEL_LOWER;
8
              bottomLabelCase = LABEL_LOWER;
9
            }
9
            }
10
            else if (labelCase.equalsIgnoreCase("mixed")) 
10
            else if (labelCase.equalsIgnoreCase("mixed")) 
11
            {
11
            {
12
              topLabelCase = LABEL_MIXED;
12
              bottomLabelCase = LABEL_MIXED;
13
            }
13
            }
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.9
Clones locationClones are in the same method
Number of node comparisons30
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)42.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    29
    String labelCase = topLabelCaseAll[0].getAttribute("value");
    29
    String labelCase = topLabelCaseAll[0].getAttribute("value");
    38
    String labelCase = bottomLabelCaseAll[0].getAttribute("value");
    Differences
    Expression1Expression2Difference
    topLabelCaseAllbottomLabelCaseAllVARIABLE_NAME_MISMATCH
    38
    String labelCase = bottomLabelCaseAll[0].getAttribute("value");
    30
    if (labelCase.equalsIgnoreCase("upper"))
    39
    if (labelCase.equalsIgnoreCase("upper"))
    31
    topLabelCase = LABEL_UPPER;
    31
    topLabelCase = LABEL_UPPER;
    40
    bottomLabelCase = LABEL_UPPER;
    Differences
    Expression1Expression2Difference
    topLabelCasebottomLabelCaseVARIABLE_NAME_MISMATCH
    40
    bottomLabelCase = LABEL_UPPER;
    32
    else if (labelCase.equalsIgnoreCase("lower"))
    41
    else if (labelCase.equalsIgnoreCase("lower"))
    33
    topLabelCase = LABEL_LOWER;
    33
    topLabelCase = LABEL_LOWER;
    42
    bottomLabelCase = LABEL_LOWER;
    Differences
    Expression1Expression2Difference
    topLabelCasebottomLabelCaseVARIABLE_NAME_MISMATCH
    42
    bottomLabelCase = LABEL_LOWER;
    34
    else if (labelCase.equalsIgnoreCase("mixed"))
    43
    else if (labelCase.equalsIgnoreCase("mixed"))
    35
    topLabelCase = LABEL_MIXED;
    35
    topLabelCase = LABEL_MIXED;
    44
    bottomLabelCase = LABEL_MIXED;
    Differences
    Expression1Expression2Difference
    topLabelCasebottomLabelCaseVARIABLE_NAME_MISMATCH
    44
    bottomLabelCase = LABEL_MIXED;
    Precondition Violations (0)
    Row Violation