File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.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 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.8 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 36 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.9 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
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); | ||||||
else | else | |||||||||
7 | super.setSelectedIndex(0); |
| 7 | super.setSelectedIndex(0); |
Row | Violation |
---|---|
1 | Super method call super.setSelectedIndex(3); cannot be extracted from method |
2 | Super method call super.setSelectedIndex(3); cannot be extracted from method |
3 | Super method call super.setSelectedIndex(2); cannot be extracted from method |
4 | Super method call super.setSelectedIndex(2); cannot be extracted from method |
5 | Super method call super.setSelectedIndex(1); cannot be extracted from method |
6 | Super method call super.setSelectedIndex(1); cannot be extracted from method |
7 | Super method call super.setSelectedIndex(0); cannot be extracted from method |
8 | Super method call super.setSelectedIndex(0); cannot be extracted from method |