public static JavahAdapter getAdapter(String choice, ProjectComponent log) throws BuildException { if ((JavaEnvUtils.isKaffe() && choice == null) || Kaffeh.IMPLEMENTATION_NAME.equals(choice)) { return new Kaffeh(); } else if (SunJavah.IMPLEMENTATION_NAME.equals(choice)) { return new SunJavah(); } else if (choice != null) { return resolveClassName(choice); } // This default has been good enough until Ant 1.6.3, so stick // with it return new SunJavah();
public static Native2AsciiAdapter getAdapter(String choice, ProjectComponent log) throws BuildException { if ((JavaEnvUtils.isKaffe() && choice == null) || KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) { return new KaffeNative2Ascii(); } else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) { return new SunNative2Ascii(); } else if (choice != null) { return resolveClassName(choice); } // This default has been good enough until Ant 1.6.3, so stick // with it return new SunNative2Ascii();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/javah/JavahAdapterFactory.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/native2ascii/Native2AsciiAdapterFactory.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public static JavahAdapter getAdapter(String choice,
1
public static Native2AsciiAdapter getAdapter(String choice,
2
                                          ProjectComponent log)
2
                                                 ProjectComponent log)
3
        throws BuildException {
3
        throws BuildException {
4
        if ((JavaEnvUtils.isKaffe() && choice == null)
4
        if ((JavaEnvUtils.isKaffe() && choice == null)
5
            || Kaffeh.IMPLEMENTATION_NAME.equals(choice)) {
5
            || KaffeNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
6
            return new Kaffeh();
6
            return new KaffeNative2Ascii();
7
        } else if (SunJavah.IMPLEMENTATION_NAME.equals(choice)) {
7
        } else if (SunNative2Ascii.IMPLEMENTATION_NAME.equals(choice)) {
8
            return new SunJavah();
8
            return new SunNative2Ascii();
9
        } else if (choice != null) {
9
        } else if (choice != null) {
10
            return resolveClassName(choice);
10
            return resolveClassName(choice);
11
        }
11
        }
12
        // This default has been good enough until Ant 1.6.3, so stick
12
        // This default has been good enough until Ant 1.6.3, so stick
13
        // with it
13
        // with it
14
        return new SunJavah();
14
        return new SunNative2Ascii();
15
    
15
    
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