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