File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/plugins/DefaultLabelRenderer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/table/SubjectTreeRenderer.java | |||
Method name: Component getTableCellRendererComponent(JTable, Object, boolean, boolean, int, int)
|
Method name: Component getTreeCellRendererComponent(JTree, Object, boolean, boolean, boolean, int, boolean)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | Color msgColor = (Color) header.get("columba.color");↵ | 1 | Color msgColor = (Color) header.get("columba.color");↵ | |
2 | if (isSelected)↵ | 2 | if (selected)↵ | |
3 | setBackground(UIManager.getColor("Table.selectionBackground"));↵ | 3 | setBackground(UIManager.getColor("Table.selectionBackground"));↵ | |
4 | else↵ | 4 | else↵ | |
5 | setBackground(table.getBackground());↵ | 5 | setBackground(table.getBackground());↵ | |
6 | if (msgColor != null) {↵ | 6 | if (msgColor != null) {↵ | |
7 | if (isSelected)↵ | 7 | if (selected)↵ | |
8 | setForeground(UIManager.getColor("Table.selectionForeground"));↵ | 8 | setForeground(UIManager.getColor("Table.selectionForeground"));↵ | |
9 | else {↵ | 9 | else {↵ | |
10 | if (msgColor.equals(Color.BLACK) == false)↵ | 10 | if (msgColor.equals(Color.BLACK) == false)↵ | |
11 | setForeground(msgColor);↵ | 11 | setForeground(msgColor);↵ | |
12 | else↵ | 12 | else↵ | |
13 | setForeground(table.getForeground());↵ | 13 | setForeground(table.getForeground());↵ | |
14 | }↵ | 14 | }↵ | |
15 | } | 15 |
| |
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 | 24 |
Number of mapped statements | 10 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | Color msgColor = (Color)header.get("columba.color"); | 20 | Color msgColor = (Color)header.get("columba.color"); | |||||||||||
19 | if (isSelected) |
| 21 | if (selected) | ||||||||||
20 | setBackground(UIManager.getColor("Table.selectionBackground")); | 22 | setBackground(UIManager.getColor("Table.selectionBackground")); | |||||||||||
else | else | |||||||||||||
21 | setBackground(table.getBackground()); | 23 | setBackground(table.getBackground()); | |||||||||||
22 | if (msgColor != null) | 24 | if (msgColor != null) | |||||||||||
23 | if (isSelected) |
| 25 | if (selected) | ||||||||||
24 | setForeground(UIManager.getColor("Table.selectionForeground")); | 26 | setForeground(UIManager.getColor("Table.selectionForeground")); | |||||||||||
else | else | |||||||||||||
25 | if (msgColor.equals(Color.BLACK) == false) | 27 | if (msgColor.equals(Color.BLACK) == false) | |||||||||||
26 | setForeground(msgColor); | 28 | setForeground(msgColor); | |||||||||||
else | else | |||||||||||||
27 | setForeground(table.getForeground()); | 29 | setForeground(table.getForeground()); |
Row | Violation |
---|---|
1 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.table.plugins.DefaultLabelRenderer and org.columba.mail.gui.table.SubjectTreeRenderer do not have a common superclass |