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