File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/statusbar/TaskRenderer.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/GenericResultPanel.java | |||
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
|
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | if (isSelected) {↵ | 1 | if (isSelected) {↵ | |
2 | setBackground(list.getSelectionBackground());↵ | 2 | setBackground(list.getSelectionBackground());↵ | |
3 | setForeground(list.getSelectionForeground());↵ | 3 | setForeground(list.getSelectionForeground());↵ | |
4 | progressPanel.setBackground(list.getSelectionBackground());↵ | 4 | topPanel.setBackground(list.getSelectionBackground());↵ | |
5 | progressPanel.setForeground(list.getSelectionForeground());↵ | 5 | topPanel.setForeground(list.getSelectionForeground());↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | setBackground(list.getBackground());↵ | 7 | setBackground(list.getBackground());↵ | |
8 | setForeground(list.getForeground());↵ | 8 | setForeground(list.getForeground());↵ | |
9 | progressPanel.setBackground(list.getBackground());↵ | 9 | topPanel.setBackground(list.getBackground());↵ | |
10 | progressPanel.setForeground(list.getForeground());↵ | 10 | topPanel.setForeground(list.getForeground());↵ | |
11 | }↵ | 11 | }↵ | |
12 | Worker worker = (Worker) value;↵ | 12 | ISearchResult result = (ISearchResult) value;↵ | |
13 | label.setText(worker.getDisplayText()); | 13 | titleLabel.setText(result.getTitle()); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 85 |
Number of mapped statements | 9 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 11.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (isSelected) | 1 | if (isSelected) | |||||||||||
2 | setBackground(list.getSelectionBackground()); | 2 | setBackground(list.getSelectionBackground()); | |||||||||||
3 | setForeground(list.getSelectionForeground()); | 3 | setForeground(list.getSelectionForeground()); | |||||||||||
4 | progressPanel.setBackground(list.getSelectionBackground()); |
| 4 | topPanel.setBackground(list.getSelectionBackground()); | ||||||||||
5 | progressPanel.setForeground(list.getSelectionForeground()); |
| 5 | topPanel.setForeground(list.getSelectionForeground()); | ||||||||||
else | else | |||||||||||||
6 | setBackground(list.getBackground()); | 6 | setBackground(list.getBackground()); | |||||||||||
7 | setForeground(list.getForeground()); | 7 | setForeground(list.getForeground()); | |||||||||||
8 | progressPanel.setBackground(list.getBackground()); |
| 8 | topPanel.setBackground(list.getBackground()); | ||||||||||
9 | progressPanel.setForeground(list.getForeground()); |
| 9 | topPanel.setForeground(list.getForeground()); | ||||||||||
| 10 | ISearchResult result = (ISearchResult)value; | ||||||||||||
10 | Worker worker = (Worker)value; | | ||||||||||||
|
| 11 | titleLabel.setText(result.getTitle()); | |||||||||||
11 | label.setText(worker.getDisplayText()); |
| |
Row | Violation |
---|---|
1 | Unmatched statement titleLabel.setText(result.getTitle()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement label.setText(worker.getDisplayText()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |