Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); } /** * Adds a reference to a CLASSPATH defined elsewhere. * * @param r the reference to an instance defining the classpath. */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } /** * Set the boot classpath to use. * * @param path the boot classpath. */ public void setBootclasspath(Path path) { if (bootclasspath == null) { bootclasspath = path; } else { bootclasspath.append(path); } } /** * Create a Path to be configured with the boot classpath * * @return a new Path instance to be configured with the boot classpath. */ 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/Javadoc.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
     *
10
     * @param r the reference to an instance defining the classpath.
9
     * @param r a reference to a source path
11
     */
10
     */
12
    public void setClasspathRef(Reference r) {
11
    public void setSourcepathRef(Reference r) {
13
        createClasspath().setRefid(r);
12
        createSourcepath().setRefid(r);
14
    }
13
    }
15
    /**
14
    /**
16
     * Set the boot classpath to use.
15
     * Set the classpath to be used for this compilation.
17
     *
16
     *
18
     * @param path the boot classpath.
17
     * @param classpath an Ant Path object containing the compilation classpath.
19
     */
18
     */
20
    public void setBootclasspath(Path path) {
19
    public void setClasspath(Path classpath) {
21
        if (bootclasspath == null) {
20
        if (compileClasspath == null) {
22
            bootclasspath = path;
21
            compileClasspath = classpath;
23
        } else {
22
        } else {
24
            bootclasspath.append(path);
23
            compileClasspath.append(classpath);
25
        }
24
        }
26
    }
25
    }
27
    /**
26
    /**
28
     * Create a Path to be configured with the boot c
27
     * Gets the classpath to be used for this compilation.
28
     * @return the class path
29
     */
30
    public Path getClasspath() {
29
lasspath
31
        return compileClasspath;
30
     *
32
    
31
     * @return a new Path instance to be configured with the boot classpath.
33
}
34
    /**
35
     * Adds a path to the classpath.
36
     * @return a class path to be configured
32
     */
37
     */
33
    public Path createBootclasspath() {
38
    public Path createClasspath() {
34
        if (bootclasspath == null) {
39
        if (compileClasspath == null) {
35
            bootclasspath = new Path(getProject());
40
            compileClasspath = new Path(getProject());
36
        }
41
        }
37
        return bootclasspath.createPath();
42
        return compileClasspath.createPath();
38
    }
43
    }
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