File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/list/DefaultBooleanRenderer.java | File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/list/DefaultStringRenderer.java | |||
Method name: Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)
|
Method name: Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (isSelected) {↵ | 1 | if (isSelected) {↵ | |
2 | setForeground(table.getSelectionForeground());↵ | 2 | setForeground(table.getSelectionForeground());↵ | |
3 | setBackground(table.getSelectionBackground());↵ | 3 | setBackground(table.getSelectionBackground());↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | setForeground(table.getForeground());↵ | 5 | setForeground(table.getForeground());↵ | |
6 | setBackground(table.getBackground());↵ | 6 | setBackground(table.getBackground());↵ | |
7 | } | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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.3 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | if (isSelected) | 1 | if (isSelected) | |
3 | setForeground(table.getSelectionForeground()); | 2 | setForeground(table.getSelectionForeground()); | |
4 | setBackground(table.getSelectionBackground()); | 3 | setBackground(table.getSelectionBackground()); | |
else | else | |||
5 | setForeground(table.getForeground()); | 4 | setForeground(table.getForeground()); | |
6 | setBackground(table.getBackground()); | 5 | setBackground(table.getBackground()); |
Row | Violation |
---|