public File locate() { /* If this is a unix-based system, check the 2 best-known areas for the * aspell binary. */ if (OSInfo.isLinux() || OSInfo.isSolaris()) { if (defaultLinux.exists()) { return defaultLinux; } else if (defaultLocalLinux.exists()) { return defaultLocalLinux; } } /* RIYAD: The Prefs API cannot be used to read the Window's registry, * it is coded to use the registry (if available) as a backing store * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use * the Windows registry and they all required a native lib to do it. */ /* If this is windows, check the default installation location for the * aspell.exe binary. */ if (OSInfo.isWin32Platform() && defaultWin.exists()) { return defaultWin; } /* Couldn't find anything, so return null and let the wizard ask the * user. */ return null;
public File locate() { /* If this is a unix-based system, check the 2 best-known areas for the * gpg binary. */ if (OSInfo.isLinux() || OSInfo.isSolaris()) { if (defaultLinux.exists()) { return defaultLinux; } else if (defaultLocalLinux.exists()) { return defaultLocalLinux; } } /* RIYAD: The Prefs API cannot be used to read the Window's registry, * it is coded to use the registry (if available) as a backing store * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use * the Windows registry and they all required a native lib to do it. */ /* If this is windows, check the default installation location for the * gpg.exe binary. */ if (OSInfo.isWin32Platform() && defaultWin.exists()) { return defaultWin; } /* Couldn't find anything, so return null and let the wizard ask the * user. */ return null;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/externaltools/ASpellPlugin.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/externaltools/GPGPlugin.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public File locate() {
1
public File locate() {
2
        /* If this is a unix-based system, check the 2 best-known areas for the
2
        /* If this is a unix-based system, check the 2 best-known areas for the
3
 * aspell binary.
3
 * gpg binary.
4
 */
4
 */
5
        if (OSInfo.isLinux() || OSInfo.isSolaris()) {
5
        if (OSInfo.isLinux() || OSInfo.isSolaris()) {
6
            if (defaultLinux.exists()) {
6
            if (defaultLinux.exists()) {
7
                return defaultLinux;
7
                return defaultLinux;
8
            } else if (defaultLocalLinux.exists()) {
8
            } else if (defaultLocalLinux.exists()) {
9
                return defaultLocalLinux;
9
                return defaultLocalLinux;
10
            }
10
            }
11
        }
11
        }
12
        /* RIYAD: The Prefs API cannot be used to read the Window's registry,
12
        /* RIYAD: The Prefs API cannot be used to read the Window's registry,
13
 * it is coded to use the registry (if available) as a backing store
13
 * it is coded to use the registry (if available) as a backing store
14
 * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER
14
 * on in the SOFTWARE/JavaSoft/Prefs registry keys for HKEY_CURRENT_USER
15
 * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use
15
 * and HKEY_LOCAL_MACHINE paths. I have seen a few java apps that use
16
 * the Windows registry and they all required a native lib to do it.
16
 * the Windows registry and they all required a native lib to do it.
17
 */
17
 */
18
        /* If this is windows, check the default installation location for the
18
        /* If this is windows, check the default installation location for the
19
 * aspell.exe binary.
19
 * gpg.exe binary.
20
 */
20
 */
21
        if (OSInfo.isWin32Platform() && defaultWin.exists()) {
21
        if (OSInfo.isWin32Platform() && defaultWin.exists()) {
22
            return defaultWin;
22
            return defaultWin;
23
        }
23
        }
24
        /* Couldn't find anything, so return null and let the wizard ask the
24
        /* Couldn't find anything, so return null and let the wizard ask the
25
 * user.
25
 * user.
26
 */
26
 */
27
        return null;
27
        return null;
28
    
28
    
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0