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