if (OSInfo.isLinux()) { activeDesktop = new JDICDesktop(); } else if (OSInfo.isWin32Platform()) { activeDesktop = new JDICDesktop(); } else if (OSInfo.isMac()) { activeDesktop = new MacDesktop(); }
if (OSInfo.isLinux()) { activeIcon = new JDICTrayIcon(); } else if (OSInfo.isWin32Platform()) { activeIcon = new JDICTrayIcon(); } else if (OSInfo.isMac()) { // tray icon not supported on Mac }
Clone fragments detected by clone detection tool
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
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are in different classes
Number of node comparisons22
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 3
    Mapped Statements
    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();
                                                                        
    Precondition Violations (0)
    Row Violation