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