void setExcludes(String excludes) { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setExcludes(excludes); directoryScanner = null; } /** * Appends <code>excludes</code> to the current list of include * patterns. * * @param excludes array containing the exclude patterns. * @since Ant 1.7 */ public synchronized void appendExcludes(String[] excludes) { if (isReference()) { throw tooManyAttributes(); } if (excludes != null) { for (int i = 0; i < excludes.length; i++) { defaultPatterns.createExclude().setName(excludes[i]); } directoryScanner = null; }
void setIncludes(String includes) { if (isReference()) { throw tooManyAttributes(); } defaultPatterns.setIncludes(includes); directoryScanner = null; } /** * Appends <code>includes</code> to the current list of include * patterns. * * @param includes array containing the include patterns. * @since Ant 1.7 */ public synchronized void appendIncludes(String[] includes) { if (isReference()) { throw tooManyAttributes(); } if (includes != null) { for (int i = 0; i < includes.length; i++) { defaultPatterns.createInclude().setName(includes[i]); } directoryScanner = null; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AbstractFileSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/AbstractFileSet.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setExcludes(String excludes) {
1
void setIncludes(String includes) {
2
        if (isReference()) {
2
        if (isReference()) {
3
            throw tooManyAttributes();
3
            throw tooManyAttributes();
4
        }
4
        }
5
        defaultPatterns.setExcludes(excludes);
5
        defaultPatterns.setIncludes(includes);
6
        directoryScanner = null;
6
        directoryScanner = null;
7
    }
7
    }
8
    /**
8
    /**
9
     * Appends <code>excludes</code> to the current list of include
9
     * Appends <code>includes</code> to the current list of include
10
     * patterns.
10
     * patterns.
11
     *
11
     *
12
     * @param excludes array containing the exclude patterns.
12
     * @param includes array containing the include patterns.
13
     * @since Ant 1.7
13
     * @since Ant 1.7
14
     */
14
     */
15
    public synchronized void appendExcludes(String[] excludes) {
15
    public synchronized void appendIncludes(String[] includes) {
16
        if (isReference()) {
16
        if (isReference()) {
17
            throw tooManyAttributes();
17
            throw tooManyAttributes();
18
        }
18
        }
19
        if (excludes != null) {
19
        if (includes != null) {
20
            for (int i = 0; i < excludes.length; i++) {
20
            for (int i = 0; i < includes.length; i++) {
21
                defaultPatterns.createExclude().setName(excludes[i]);
21
                defaultPatterns.createInclude().setName(includes[i]);
22
            }
22
            }
23
            directoryScanner = null;
23
            directoryScanner = null;
24
        }
24
        }
25
    
25
    
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