if (option == DateFormat.SHORT) super.setSelectedIndex(3); else if (option == DateFormat.MEDIUM) super.setSelectedIndex(2); else if (option == DateFormat.LONG) super.setSelectedIndex(1); else super.setSelectedIndex(0);
if (option == DateFormat.SHORT) super.setSelectedIndex(3); else if (option == DateFormat.MEDIUM) super.setSelectedIndex(2); else if (option == DateFormat.LONG) super.setSelectedIndex(1); else super.setSelectedIndex(0);
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDate.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java
Method name: void setSelectedIndex(int) Method name: void setSelectedIndex(int)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (option == DateFormat.SHORT)
1
if (option == DateFormat.SHORT)
2
				super.setSelectedIndex(3);
2
            super.setSelectedIndex(3);
3
			else if (option == DateFormat.MEDIUM)
3
         else if (option == DateFormat.MEDIUM)
4
				super.setSelectedIndex(2);
4
            super.setSelectedIndex(2);
5
			else if (option == DateFormat.LONG)
5
         else if (option == DateFormat.LONG)
6
				super.setSelectedIndex(1);
6
            super.setSelectedIndex(1);
7
			else super.setSelectedIndex(0);
7
         else super.setSelectedIndex(0);
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.9
Clones locationClones are in different classes having the same super class
Number of node comparisons36
  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)2.1
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (option == DateFormat.SHORT)
    1
    if (option == DateFormat.SHORT)
    2
    super.setSelectedIndex(3);
    2
    super.setSelectedIndex(3);
    2
    super.setSelectedIndex(3);
    Preondition Violations
    Super method call super.setSelectedIndex(3); cannot be extracted from method
    Super method call super.setSelectedIndex(3); cannot be extracted from method
    2
    super.setSelectedIndex(3);
    3
    else if (option == DateFormat.MEDIUM)
    3
    else if (option == DateFormat.MEDIUM)
    4
    super.setSelectedIndex(2);
    4
    super.setSelectedIndex(2);
    4
    super.setSelectedIndex(2);
    Preondition Violations
    Super method call super.setSelectedIndex(2); cannot be extracted from method
    Super method call super.setSelectedIndex(2); cannot be extracted from method
    4
    super.setSelectedIndex(2);
    5
    else if (option == DateFormat.LONG)
    5
    else if (option == DateFormat.LONG)
    6
    super.setSelectedIndex(1);
    6
    super.setSelectedIndex(1);
    6
    super.setSelectedIndex(1);
    Preondition Violations
    Super method call super.setSelectedIndex(1); cannot be extracted from method
    Super method call super.setSelectedIndex(1); cannot be extracted from method
    6
    super.setSelectedIndex(1);
    else
    else
    7
    super.setSelectedIndex(0);
    7
    super.setSelectedIndex(0);
    7
    super.setSelectedIndex(0);
    Preondition Violations
    Super method call super.setSelectedIndex(0); cannot be extracted from method
    Super method call super.setSelectedIndex(0); cannot be extracted from method
    7
    super.setSelectedIndex(0);
    Precondition Violations (8)
    Row Violation
    1Super method call super.setSelectedIndex(3); cannot be extracted from method
    2Super method call super.setSelectedIndex(3); cannot be extracted from method
    3Super method call super.setSelectedIndex(2); cannot be extracted from method
    4Super method call super.setSelectedIndex(2); cannot be extracted from method
    5Super method call super.setSelectedIndex(1); cannot be extracted from method
    6Super method call super.setSelectedIndex(1); cannot be extracted from method
    7Super method call super.setSelectedIndex(0); cannot be extracted from method
    8Super method call super.setSelectedIndex(0); cannot be extracted from method