void setClasspath(Path path) { if (classpath == null) { classpath = path; } else { classpath.append(path); } } /** * Create a Path to be configured with the classpath to use * * @return a new Path instance to be configured with the classpath. */ public 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(); }
void setClasspath(Path cp) { if (classpath == null) { classpath = cp; } else { classpath.append(cp); } } /** * Adds a path to the classpath. * @return a path to be configured. */ public 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. */ public void setClasspathRef(Reference r) { createClasspath().setRefid(r); } /** * Get the classpath. * @return the classpath. */ public Path getClasspath() { return classpath; } /** * Set the classpath to be used to find this compiler adapter * @param cp the compiler classpath. */ public void setCompilerclasspath(Path cp) { if (compilerClasspath == null) { compilerClasspath = cp; } else { compilerClasspath.append(cp); } } /** * get the classpath used to find the compiler adapter * @return the compiler classpath. */ public Path getCompilerclasspath() { return compilerClasspath; } /** * Support nested compiler classpath, used to locate compiler adapter * @return a path to be configured. */ public Path createCompilerclasspath() { if (compilerClasspath == null) { compilerClasspath = new Path(getProject()); } return compilerClasspath.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/optional/jsp/JspC.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setClasspath(Path path) {
1
void setClasspath(Path cp) {
2
        if (classpath == null) {
2
        if (classpath == null) {
3
            classpath = path;
3
            classpath = cp;
4
        } else {
4
        } else {
5
            classpath.append(path);
5
            classpath.append(cp);
6
        }
6
        }
7
    }
7
    }
8
    /**
8
    /**
9
     * Create a Path to be configured with the classpath to use
9
     * Adds a path to 
10
     *
11
     * @return a new Path instance to be configured with the classpath
10
the classpath.
12
.
11
     * @return a path to be configured.
13
     */
12
     */
14
    public Path createClasspath() {
13
    public Path createClasspath() {
15
        if (classpath == null) {
14
        if (classpath == null) {
16
            classpath = new Path(getProject());
15
            classpath = new Path(getProject());
17
        }
16
        }
18
        return classpath.createPath();
17
        return classpath.createPath();
19
    }
18
    }
20
    /**
19
    /**
21
     * Adds a reference to a CLASSPATH defined elsewhere.
20
     * Adds a reference to a classpath defined elsewhere
22
     *
23
     * @param r the reference to an instance defining the classpath.
21
     * @param r a reference to a classpath.
24
     */
22
     */
25
    public void setClasspathRef(Reference r) {
23
    public void setClasspathRef(Reference r) {
26
        createClasspath().setRefid(r);
24
        createClasspath().setRefid(r);
27
    }
25
    }
28
    /**
26
    /**
29
     * Set the boot
27
     * Get the classpath.
28
     * @return the classpath.
29
     */
30
    public Path getClasspath() {
31
        return classpath;
32
    }
33
    /**
30
 classpath to use.
34
     * Set the classpath to 
31
     *
35
be used to find this compiler adapter
32
     * @param path the boot classpath.
36
     * @param cp the compiler classpath.
33
     */
37
     */
34
    public void setBootclasspath(Path path) {
38
    public void setCompilerclasspath(Path cp) {
35
        if (bootclasspath == null) {
39
        if (compilerClasspath == null) {
36
            bootclasspath = path;
40
            compilerClasspath = cp;
37
        } else {
41
        } else {
38
            bootclasspath.append(path);
42
            compilerClasspath.append(cp);
39
        }
43
        }
40
    }
44
    }
41
    /**
45
    /**
42
     * Create a Path to be configured with the boot
46
     * get the classpath used to find the compiler adapter
43
 classpath
47
     * @return the compiler classpath.
44
     *
48
     */
45
     * @return a new Path instance to be configured with the boot classpath
49
    public Path getCompilerclasspath() {
50
        return compilerClasspath;
51
    }
52
    /**
53
     * Support nested compiler classpath, used to locate compiler adapter
46
.
54
     * @return a path to be configured.
47
     */
55
     */
48
    public Path createBootclasspath() {
56
    public Path createCompilerclasspath() {
49
        if (bootclasspath == null) {
57
        if (compilerClasspath == null) {
50
            bootclasspath = new Path(getProject());
58
            compilerClasspath = new Path(getProject());
51
        }
59
        }
52
        return bootclasspath.createPath();
60
        return compilerClasspath.createPath();
53
    }
61
    }
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