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(); }
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/jsp/JspC.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 source path
10
     */
10
     */
11
    public void setClasspathRef(Reference r) {
11
    public void setSourcepathRef(Reference r) {
12
        createClasspath().setRefid(r);
12
        createSourcepath().setRefid(r);
13
    }
13
    }
14
    /**
14
    /**
15
     * Get the classpath.
15
     * Set the classpath
16
     * @return the classpath.
16
 to be used for this compilation.
17
     */
17
     *
18
    public Path getClasspath() {
18
    
19
        return classpath;
20
    }
21
    /**
22
     * Set the classpath to be used to find this compiler adapter
23
     * @param cp the compiler classpath.
19
 * @param classpath an Ant Path object containing the compilation classpath.
24
     */
20
     */
25
    public void setCompilerclasspath(Path cp) {
21
    public void setClasspath(Path classpath) {
26
        if (compilerClasspath == null) {
22
        if (compileClasspath == null) {
27
            compilerClasspath = cp;
23
            compileClasspath = classpath;
28
        } else {
24
        } else {
29
            compilerClasspath.append(cp);
25
            compileClasspath.append(classpath);
30
        }
26
        }
31
    }
27
    }
32
    /**
28
    /**
33
     * get the classpath used to find the compiler adapter
29
     * Gets the classpath to be used for this compilation.
34
     * @return the compiler classpath.
30
     * @return the class path
35
     */
31
     */
36
    public Path getCompilerclasspath() {
32
    public Path getClasspath() {
37
        return compilerClasspath;
33
        return compileClasspath;
38
    }
34
    }
39
    /**
35
    /**
40
     * Support nested compiler classpath, used to locate compiler adapter
36
     * Adds a path to the classpath.
41
     * @return a path to be configured.
37
     * @return a class path to be configured
42
     */
38
     */
43
    public Path createCompilerclasspath() {
39
    public Path createClasspath() {
44
        if (compilerClasspath == null) {
40
        if (compileClasspath == null) {
45
            compilerClasspath = new Path(getProject());
41
            compileClasspath = new Path(getProject());
46
        }
42
        }
47
        return compilerClasspath.createPath();
43
        return compileClasspath.createPath();
48
    }
44
    }
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