String[] getIncludedFiles() { if (filesIncluded == null) { throw new IllegalStateException("Must call scan() first"); } String[] files = new String[filesIncluded.size()]; filesIncluded.copyInto(files); Arrays.sort(files); return files; } /** * Return the count of included files. * @return <code>int</code>. * @since Ant 1.6.3 */ public synchronized int getIncludedFilesCount() { if (filesIncluded == null) { throw new IllegalStateException("Must call scan() first"); } return filesIncluded.size(); } /** * Return the names of the files which matched none of the include * patterns. The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed. * * @return the names of the files which matched none of the include * patterns. * * @see #slowScan */ public synchronized String[] getNotIncludedFiles() { slowScan(); String[] files = new String[filesNotIncluded.size()]; filesNotIncluded.copyInto(files); return files; } /** * Return the names of the files which matched at least one of the * include patterns and at least one of the exclude patterns. * The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed. * * @return the names of the files which matched at least one of the * include patterns and at least one of the exclude patterns. * * @see #slowScan */ public synchronized String[] getExcludedFiles() { slowScan(); String[] files = new String[filesExcluded.size()]; filesExcluded.copyInto(files); return files; } /** * <p>Return the names of the files which were selected out and * therefore not ultimately included.</p> * * <p>The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed.</p> * * @return the names of the files which were deselected. * * @see #slowScan */ public synchronized String[] getDeselectedFiles() { slowScan(); String[] files = new String[filesDeselected.size()]; filesDeselected.copyInto(files); return files;
String[] getIncludedDirectories() { if (dirsIncluded == null) { throw new IllegalStateException("Must call scan() first"); } String[] directories = new String[dirsIncluded.size()]; dirsIncluded.copyInto(directories); Arrays.sort(directories); return directories; } /** * Return the count of included directories. * @return <code>int</code>. * @since Ant 1.6.3 */ public synchronized int getIncludedDirsCount() { if (dirsIncluded == null) { throw new IllegalStateException("Must call scan() first"); } return dirsIncluded.size(); } /** * Return the names of the directories which matched none of the include * patterns. The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed. * * @return the names of the directories which matched none of the include * patterns. * * @see #slowScan */ public synchronized String[] getNotIncludedDirectories() { slowScan(); String[] directories = new String[dirsNotIncluded.size()]; dirsNotIncluded.copyInto(directories); return directories; } /** * Return the names of the directories which matched at least one of the * include patterns and at least one of the exclude patterns. * The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed. * * @return the names of the directories which matched at least one of the * include patterns and at least one of the exclude patterns. * * @see #slowScan */ public synchronized String[] getExcludedDirectories() { slowScan(); String[] directories = new String[dirsExcluded.size()]; dirsExcluded.copyInto(directories); return directories; } /** * <p>Return the names of the directories which were selected out and * therefore not ultimately included.</p> * * <p>The names are relative to the base directory. This involves * performing a slow scan if one has not already been completed.</p> * * @return the names of the directories which were deselected. * * @see #slowScan */ public synchronized String[] getDeselectedDirectories() { slowScan(); String[] directories = new String[dirsDeselected.size()]; dirsDeselected.copyInto(directories); return directories;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/DirectoryScanner.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
String[] getIncludedFiles() {
1
String[] getIncludedDirectories() {
2
        if (filesIncluded == null) {
2
        if (dirsIncluded == null) {
3
            throw new IllegalStateException("Must call scan() first");
3
            throw new IllegalStateException("Must call scan() first");
4
        }
4
        }
5
        String[] files = new String[filesIncluded.size()];
5
        String[] directories = new String[dirsIncluded.size()];
6
        filesIncluded.copyInto(files);
6
        dirsIncluded.copyInto(directories);
7
        Arrays.sort(files);
7
        Arrays.sort(directories);
8
        return files;
8
        return directories;
9
    }
9
    }
10
    /**
10
    /**
11
     * Return the count of included files.
11
     * Return the count of included directories.
12
     * @return <code>int</code>.
12
     * @return <code>int</code>.
13
     * @since Ant 1.6.3
13
     * @since Ant 1.6.3
14
     */
14
     */
15
    public synchronized int getIncludedFilesCount() {
15
    public synchronized int getIncludedDirsCount() {
16
        if (filesIncluded == null) {
16
        if (dirsIncluded == null) {
17
            throw new IllegalStateException("Must call scan() first");
17
            throw new IllegalStateException("Must call scan() first");
18
        }
18
        }
19
        return filesIncluded.size();
19
        return dirsIncluded.size();
20
    }
20
    }
21
    /**
21
    /**
22
     * Return the names of the files which matched none of the include
22
     * Return the names of the directories which matched none of the include
23
     * patterns. The names are relative to the base directory. This involves
23
     * patterns. The names are relative to the base directory. This involves
24
     * performing a slow scan if one has not already been completed.
24
     * performing a slow scan if one has not already been completed.
25
     *
25
     *
26
     * @return the names of the files which matched none of the include
26
     * @return the names of the directories which matched none of the include
27
     *         patterns.
27
     * patterns.
28
     *
28
     *
29
     * @see #slowScan
29
     * @see #slowScan
30
     */
30
     */
31
    public synchronized String[] getNotIncludedFiles() {
31
    public synchronized String[] getNotIncludedDirectories() {
32
        slowScan();
32
        slowScan();
33
        String[] files = new String[filesNotIncluded.size()];
33
        String[] directories = new String[dirsNotIncluded.size()];
34
        filesNotIncluded.copyInto(files);
34
        dirsNotIncluded.copyInto(directories);
35
        return files;
35
        return directories;
36
    }
36
    }
37
    /**
37
    /**
38
     * Return the names of the files which matched at least one of the
38
     * Return the names of the directories which matched at least one of the
39
     * include patterns and at least one of the exclude patterns.
39
     * include patterns and at least one of the exclude patterns.
40
     * The names are relative to the base directory. This involves
40
     * The names are relative to the base directory. This involves
41
     * performing a slow scan if one has not already been completed.
41
     * performing a slow scan if one has not already been completed.
42
     *
42
     *
43
     * @return the names of the files which matched at least one of the
43
     * @return the names of the directories which matched at least one of the
44
     *         include patterns and at least one of the exclude patterns.
44
     * include patterns and at least one of the exclude patterns.
45
     *
45
     *
46
     * @see #slowScan
46
     * @see #slowScan
47
     */
47
     */
48
    public synchronized String[] getExcludedFiles() {
48
    public synchronized String[] getExcludedDirectories() {
49
        slowScan();
49
        slowScan();
50
        String[] files = new String[filesExcluded.size()];
50
        String[] directories = new String[dirsExcluded.size()];
51
        filesExcluded.copyInto(files);
51
        dirsExcluded.copyInto(directories);
52
        return files;
52
        return directories;
53
    }
53
    }
54
    /**
54
    /**
55
     * <p>Return the names of the files which were selected out and
55
     * <p>Return the names of the directories which were selected out and
56
     * therefore not ultimately included.</p>
56
     * therefore not ultimately included.</p>
57
     *
57
     *
58
     * <p>The names are relative to the base directory. This involves
58
     * <p>The names are relative to the base directory. This involves
59
     * performing a slow scan if one has not already been completed.</p>
59
     * performing a slow scan if one has not already been completed.</p>
60
     *
60
     *
61
     * @return the names of the files which were deselected.
61
     * @return the names of the directories which were deselected.
62
     *
62
     *
63
     * @see #slowScan
63
     * @see #slowScan
64
     */
64
     */
65
    public synchronized String[] getDeselectedFiles() {
65
    public synchronized String[] getDeselectedDirectories() {
66
        slowScan();
66
        slowScan();
67
        String[] files = new String[filesDeselected.size()];
67
        String[] directories = new String[dirsDeselected.size()];
68
        filesDeselected.copyInto(files);
68
        dirsDeselected.copyInto(directories);
69
        return files;
69
        return directories;
70
    
70
    
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