Path createSourcepath() { if (compileSourcepath == null) { compileSourcepath = new Path(getProject()); } return compileSourcepath.createPath(); } /** * Adds a reference to a source path defined elsewhere. * @param r a reference to a source path */ public void setSourcepathRef(Reference r) { createSourcepath().setRefid(r); } /** * Set the classpath to be used for this compilation. * * @param classpath an Ant Path object containing the compilation classpath. */ public void setClasspath(Path classpath) { if (compileClasspath == null) { compileClasspath = classpath; } else { compileClasspath.append(classpath); } } /** * Gets the classpath to be used for this compilation. * @return the class path */ public Path getClasspath() { return compileClasspath; } /** * Adds a path to the classpath. * @return a class path to be configured */ public Path createClasspath() { if (compileClasspath == null) { compileClasspath = new Path(getProject()); } return compileClasspath.createPath();
Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); } /** * Adds a reference to a classpath defined elsewhere. * @param r a reference to a classpath. * @todo this needs to be documented in the HTML docs. */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } /** * The classpath to use. * @return the classpath. * @since Ant 1.6.3 */ public Path getClasspath() { return classpath; } /** * location of bootstrap class files. * @param src the bootstrap classpath. */ public void setBootclasspath(Path src) { if (bootclasspath == null) { bootclasspath = src; } else { bootclasspath.append(src); } } /** * Adds path to bootstrap class files. * @return a path to be configured. */ public Path createBootclasspath() { if (bootclasspath == null) { bootclasspath = new Path(getProject()); } return bootclasspath.createPath();
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Javac.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/Javah.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
Path createSourcepath() {
1
Path createClasspath() {
2
        if (compileSourcepath == null) {
2
        if (classpath == null) {
3
            compileSourcepath = new Path(getProject());
3
            classpath = new Path(getProject());
4
        }
4
        }
5
        return compileSourcepath.createPath();
5
        return classpath.createPath();
6
    }
6
    }
7
    /**
7
    /**
8
     * Adds a reference to a source path defined elsewhere.
8
     * Adds a reference to a classpath defined elsewhere.
9
     * @param r a reference to a source path
9
     * @param r a reference to a classpath.
10
     * @todo this needs to be documented in the HTML docs.
10
     */
11
     */
11
    public void setSourcepathRef(Reference r) {
12
    public void setClasspathRef(Reference r) {
12
        createSourcepath().setRefid(r);
13
        createClasspath().setRefid(r);
13
    }
14
    }
14
    /**
15
    /**
15
     * Set the classpath to be used for this compilation.
16
     * The classpath to 
16
     *
17
     * @param classpath an Ant Path object containing the compilation
17
use.
18
     * @return the classpath.
19
     * @since Ant 1.6.3
20
     */
21
    public Path getClasspath() {
22
        return classpath;
23
    }
24
    /**
25
     * location of bootstrap class files.
18
 classpath.
26
     * @param src the bootstrap classpath.
19
     */
27
     */
20
    public void setClasspath(Path classpath) {
28
    public void setBootclasspath(Path src) {
21
        if (compileClasspath == null) {
29
        if (bootclasspath == null) {
22
            compileClasspath = classpath;
30
            bootclasspath = src;
23
        } else {
31
        } else {
24
            compileClasspath.append(classpath);
32
            bootclasspath.append(src);
25
        }
33
        }
26
    }
34
    }
27
    /**
35
    /**
28
     * Gets the classpath to be used for this compilation.
36
     * 
29
     * @return the class path
30
     */
31
    public Path getClasspath() {
32
        return compileClasspath;
33
    }
34
    /**
35
     * Adds a path to the classpath.
37
Adds path to bootstrap class files.
36
     * @return a class path to be configured
38
     * @return a path to be configured.
37
     */
39
     */
38
    public Path createClasspath() {
40
    public Path createBootclasspath() {
39
        if (compileClasspath == null) {
41
        if (bootclasspath == null) {
40
            compileClasspath = new Path(getProject());
42
            bootclasspath = new Path(getProject());
41
        }
43
        }
42
        return compileClasspath.createPath();
44
        return bootclasspath.createPath();
43
    
45
    
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