File path: /columba-1.4-src/core/src/main/java/org/columba/core/desktop/ColumbaDesktop.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/trayicon/ColumbaTrayIcon.java | |||
Method name: void initActiveDesktop()
|
Method name: void initActiveIcon()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 5 | |||
1 | if (OSInfo.isLinux()) {↵ | 1 | if (OSInfo.isLinux()) {↵ | |
2 | activeDesktop = new JDICDesktop();↵ | 2 | activeIcon = new JDICTrayIcon();↵ | |
3 | } else if (OSInfo.isWin32Platform()) {↵ | 3 | } else if (OSInfo.isWin32Platform()) {↵ | |
4 | activeDesktop = new JDICDesktop();↵ | 4 | activeIcon = new JDICTrayIcon();↵ | |
5 | } else if (OSInfo.isMac()) {↵ | 5 | } else if (OSInfo.isMac()) {↵ | |
6 | activeDesktop = new MacDesktop();↵ | 6 | // tray icon not supported on Mac↵ | |
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.7 |
Clones location | Clones are in different classes |
Number of node comparisons | 22 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
2 | if (OSInfo.isLinux()) | 2 | if (OSInfo.isLinux()) | ||||
|
| 3 | activeIcon = new JDICTrayIcon(); | ||||
3 | activeDesktop = new JDICDesktop(); |
| | ||||
4 | else if (OSInfo.isWin32Platform()) | 4 | else if (OSInfo.isWin32Platform()) | ||||
|
| 5 | activeIcon = new JDICTrayIcon(); | ||||
5 | activeDesktop = new JDICDesktop(); |
| | ||||
6 | else if (OSInfo.isMac()) | 6 | else if (OSInfo.isMac()) | ||||
7 | activeDesktop = new MacDesktop(); |
| |
Row | Violation |
---|---|
1 | Unmatched statement activeIcon=new JDICTrayIcon(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement activeDesktop=new JDICDesktop(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement activeIcon=new JDICTrayIcon(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement activeDesktop=new JDICDesktop(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement activeDesktop=new MacDesktop(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |