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; }
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; }
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 =  bottomLabelCaseAll[0].getAttribute("value");
1
String labelCase =  topLabelCaseAll[0].getAttribute("value");
2
            if (labelCase.equalsIgnoreCase("upper")) 
2
            if (labelCase.equalsIgnoreCase("upper")) 
3
            {
3
            {
4
              bottomLabelCase = LABEL_UPPER;
4
              topLabelCase = LABEL_UPPER;
5
            }
5
            }
6
            else if (labelCase.equalsIgnoreCase("lower")) 
6
            else if (labelCase.equalsIgnoreCase("lower")) 
7
            {
7
            {
8
              bottomLabelCase = LABEL_LOWER;
8
              topLabelCase = LABEL_LOWER;
9
            }
9
            }
10
            else if (labelCase.equalsIgnoreCase("mixed")) 
10
            else if (labelCase.equalsIgnoreCase("mixed")) 
11
            {
11
            {
12
              bottomLabelCase = LABEL_MIXED;
12
              topLabelCase = LABEL_MIXED;
13
            }
13
            }
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.6
Clones locationClones are in the same method
Number of node comparisons30
  1. {Non-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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    38
    String labelCase = bottomLabelCaseAll[0].getAttribute("value");
    38
    String labelCase = bottomLabelCaseAll[0].getAttribute("value");
    29
    String labelCase = topLabelCaseAll[0].getAttribute("value");
    Differences
    Expression1Expression2Difference
    bottomLabelCaseAlltopLabelCaseAllVARIABLE_NAME_MISMATCH
    29
    String labelCase = topLabelCaseAll[0].getAttribute("value");
    39
    if (labelCase.equalsIgnoreCase("upper"))
    30
    if (labelCase.equalsIgnoreCase("upper"))
    40
    bottomLabelCase = LABEL_UPPER;
    40
    bottomLabelCase = LABEL_UPPER;
    31
    topLabelCase = LABEL_UPPER;
    Differences
    Expression1Expression2Difference
    bottomLabelCasetopLabelCaseVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    Expression topLabelCase is a field being modified, and thus it cannot be parameterized
    31
    topLabelCase = LABEL_UPPER;
    41
    else if (labelCase.equalsIgnoreCase("lower"))
    32
    else if (labelCase.equalsIgnoreCase("lower"))
    42
    bottomLabelCase = LABEL_LOWER;
    42
    bottomLabelCase = LABEL_LOWER;
    33
    topLabelCase = LABEL_LOWER;
    Differences
    Expression1Expression2Difference
    bottomLabelCasetopLabelCaseVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    Expression topLabelCase is a field being modified, and thus it cannot be parameterized
    33
    topLabelCase = LABEL_LOWER;
    43
    else if (labelCase.equalsIgnoreCase("mixed"))
    34
    else if (labelCase.equalsIgnoreCase("mixed"))
    44
    bottomLabelCase = LABEL_MIXED;
    44
    bottomLabelCase = LABEL_MIXED;
    35
    topLabelCase = LABEL_MIXED;
    Differences
    Expression1Expression2Difference
    bottomLabelCasetopLabelCaseVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    Expression topLabelCase is a field being modified, and thus it cannot be parameterized
    35
    topLabelCase = LABEL_MIXED;
    Precondition Violations (6)
    Row Violation
    1Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    2Expression topLabelCase is a field being modified, and thus it cannot be parameterized
    3Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    4Expression topLabelCase is a field being modified, and thus it cannot be parameterized
    5Expression bottomLabelCase is a field being modified, and thus it cannot be parameterized
    6Expression topLabelCase is a field being modified, and thus it cannot be parameterized