void setClasspath(Path classpath) { if (isReference()) { throw tooManyAttributes(); } if (this.classpath == null) { this.classpath = classpath; } else { this.classpath.append(classpath); } } /** * Set the classpath to load the FilterReader through (nested element). * @return a classpath to be configured */ public Path createClasspath() { if (isReference()) { throw noChildrenAllowed(); } if (this.classpath == null) { this.classpath = new Path(getProject()); } return this.classpath.createPath(); } /** * Get the classpath. * @return the classpath */ public Path getClasspath() { return classpath; } /** * Set the classpath to load the FilterReader through via * reference (attribute). * @param r a reference to a classpath */ public void setClasspathRef(Reference r) { if (isReference()) { throw tooManyAttributes(); } createClasspath().setRefid(r);
void setClasspath(Path classpath) { if (isReference()) { throw tooManyAttributes(); } if (this.classpath == null) { this.classpath = classpath; } else { this.classpath.append(classpath); } } /** * Specify the classpath to use to load the Selector (nested element). * @return a classpath to be configured */ public final Path createClasspath() { if (isReference()) { throw noChildrenAllowed(); } if (this.classpath == null) { this.classpath = new Path(getProject()); } return this.classpath.createPath(); } /** * Get the classpath * @return the classpath */ public final Path getClasspath() { return classpath; } /** * Set the classpath to use for loading a custom selector by using * a reference. * @param r a reference to the classpath */ public void setClasspathref(Reference r) { if (isReference()) { throw tooManyAttributes(); } createClasspath().setRefid(r);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AntFilterReader.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/ExtendSelector.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setClasspath(Path classpath) {
1
void setClasspath(Path classpath) {
2
        if (isReference()) {
2
        if (isReference()) {
3
            throw tooManyAttributes();
3
            throw tooManyAttributes();
4
        }
4
        }
5
        if (this.classpath == null) {
5
        if (this.classpath == null) {
6
            this.classpath = classpath;
6
            this.classpath = classpath;
7
        } else {
7
        } else {
8
            this.classpath.append(classpath);
8
            this.classpath.append(classpath);
9
        }
9
        }
10
    }
10
    }
11
    /**
11
    /**
12
     * Set the classpath to load the FilterReader through (nested element).
12
     * Specify the classpath to use to load the Selector (nested element).
13
     * @return a classpath to be configured
13
     * @return a classpath to be configured
14
     */
14
     */
15
    public Path createClasspath() {
15
    public final Path createClasspath() {
16
        if (isReference()) {
16
        if (isReference()) {
17
            throw noChildrenAllowed();
17
            throw noChildrenAllowed();
18
        }
18
        }
19
        if (this.classpath == null) {
19
        if (this.classpath == null) {
20
            this.classpath = new Path(getProject());
20
            this.classpath = new Path(getProject());
21
        }
21
        }
22
        return this.classpath.createPath();
22
        return this.classpath.createPath();
23
    }
23
    }
24
    /**
24
    /**
25
     * Get the classpath.
25
     * Get the classpath
26
     * @return the classpath
26
     * @return the classpath
27
     */
27
     */
28
    public Path getClasspath() {
28
    public final Path getClasspath() {
29
        return classpath;
29
        return classpath;
30
    }
30
    }
31
    /**
31
    /**
32
     * Set the classpath to load the FilterReader through via
32
     * Set the classpath to use for loading a custom selector by using
33
     * reference (attribute).
33
     * a reference.
34
     * @param r a reference to a classpath
34
     * @param r a reference to the classpath
35
     */
35
     */
36
    public void setClasspathRef(Reference r) {
36
    public void setClasspathref(Reference r) {
37
        if (isReference()) {
37
        if (isReference()) {
38
            throw tooManyAttributes();
38
            throw tooManyAttributes();
39
        }
39
        }
40
        createClasspath().setRefid(r);
40
        createClasspath().setRefid(r);
41
    
41
    
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