public void copyFile(String sourceFile, String destFile) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile); } /** * Convenience method to copy a file from a source to a destination * specifying if token filtering should be used. * * @param sourceFile Name of file to copy from. * Must not be <code>null</code>. * @param destFile Name of file to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * * @exception IOException if the copying fails. * * @deprecated since 1.4.x */ public void copyFile(String sourceFile, String destFile, boolean filtering) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null); } /** * Convenience method to copy a file from a source to a * destination specifying if token filtering should be used and if * source files may overwrite newer destination files. * * @param sourceFile Name of file to copy from. * Must not be <code>null</code>. * @param destFile Name of file to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * @param overwrite Whether or not the destination file should be * overwritten if it already exists. * * @exception IOException if the copying fails. * * @deprecated since 1.4.x */ public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null, overwrite); } /** * Convenience method to copy a file from a source to a * destination specifying if token filtering should be used, if * source files may overwrite newer destination files, and if the * last modified time of the resulting file should be set to * that of the source file. * * @param sourceFile Name of file to copy from. * Must not be <code>null</code>. * @param destFile Name of file to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * @param overwrite Whether or not the destination file should be * overwritten if it already exists. * @param preserveLastModified Whether or not the last modified time of * the resulting file should be set to that * of the source file. * * @exception IOException if the copying fails. * * @deprecated since 1.4.x */ public void copyFile(String sourceFile, String destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null, overwrite, preserveLastModified)
public void copyFile(File sourceFile, File destFile) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile); } /** * Convenience method to copy a file from a source to a destination * specifying if token filtering should be used. * * @param sourceFile File to copy from. * Must not be <code>null</code>. * @param destFile File to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * * @exception IOException if the copying fails. * * @deprecated since 1.4.x */ public void copyFile(File sourceFile, File destFile, boolean filtering) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null); } /** * Convenience method to copy a file from a source to a * destination specifying if token filtering should be used and if * source files may overwrite newer destination files. * * @param sourceFile File to copy from. * Must not be <code>null</code>. * @param destFile File to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * @param overwrite Whether or not the destination file should be * overwritten if it already exists. * * @exception IOException if the file cannot be copied. * * @deprecated since 1.4.x */ public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null, overwrite); } /** * Convenience method to copy a file from a source to a * destination specifying if token filtering should be used, if * source files may overwrite newer destination files, and if the * last modified time of the resulting file should be set to * that of the source file. * * @param sourceFile File to copy from. * Must not be <code>null</code>. * @param destFile File to copy to. * Must not be <code>null</code>. * @param filtering Whether or not token filtering should be used during * the copy. * @param overwrite Whether or not the destination file should be * overwritten if it already exists. * @param preserveLastModified Whether or not the last modified time of * the resulting file should be set to that * of the source file. * * @exception IOException if the file cannot be copied. * * @deprecated since 1.4.x */ public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException { FILE_UTILS.copyFile(sourceFile, destFile, filtering ? globalFilters : null, overwrite, preserveLastModified)
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/Project.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void copyFile(String sourceFile, String destFile)
1
public void copyFile(File sourceFile, File destFile)
2
          throws IOException {
2
 throws IOException {
3
        FILE_UTILS.copyFile(sourceFile, destFile);
3
        FILE_UTILS.copyFile(sourceFile, destFile);
4
    }
4
    }
5
    /**
5
    /**
6
     * Convenience method to copy a file from a source to a destination
6
     * Convenience method to copy a file from a source to a destination
7
     * specifying if token filtering should be used.
7
     * specifying if token filtering should be used.
8
     *
8
     *
9
     * @param sourceFile Name of file to copy from.
9
     * @param sourceFile File to copy from.
10
     *                   Must not be <code>null</code>.
10
     *                   Must not be <code>null</code>.
11
     * @param destFile Name of file to copy to.
11
     * @param destFile File to copy to.
12
     *                 Must not be <code>null</code>.
12
     *                 Must not be <code>null</code>.
13
     * @param filtering Whether or not token filtering should be used during
13
     * @param filtering Whether or not token filtering should be used during
14
     *                  the copy.
14
     *                  the copy.
15
     *
15
     *
16
     * @exception IOException if the copying fails.
16
     * @exception IOException if the copying fails.
17
     *
17
     *
18
     * @deprecated since 1.4.x
18
     * @deprecated since 1.4.x
19
     */
19
     */
20
    public void copyFile(String sourceFile, String destFile, boolean filtering)
20
    public void copyFile(File sourceFile, File destFile, boolean filtering)
21
        throws IOException {
21
        throws IOException {
22
        FILE_UTILS.copyFile(sourceFile, destFile,
22
        FILE_UTILS.copyFile(sourceFile, destFile,
23
            filtering ? globalFilters : null);
23
            filtering ? globalFilters : null);
24
    }
24
    }
25
    /**
25
    /**
26
     * Convenience method to copy a file from a source to a
26
     * Convenience method to copy a file from a source to a
27
     * destination specifying if token filtering should be used and if
27
     * destination specifying if token filtering should be used and if
28
     * source files may overwrite newer destination files.
28
     * source files may overwrite newer destination files.
29
     *
29
     *
30
     * @param sourceFile Name of file to copy from.
30
     * @param sourceFile File to copy from.
31
     *                   Must not be <code>null</code>.
31
     *                   Must not be <code>null</code>.
32
     * @param destFile Name of file to copy to.
32
     * @param destFile File to copy to.
33
     *                 Must not be <code>null</code>.
33
     *                 Must not be <code>null</code>.
34
     * @param filtering Whether or not token filtering should be used during
34
     * @param filtering Whether or not token filtering should be used during
35
     *                  the copy.
35
     *                  the copy.
36
     * @param overwrite Whether or not the destination file should be
36
     * @param overwrite Whether or not the destination file should be
37
     *                  overwritten if it already exists.
37
     *                  overwritten if it already exists.
38
     *
38
     *
39
     * @exception IOException if the copying fails.
39
     * @exception IOException if the file cannot be copied.
40
     *
40
     *
41
     * @deprecated since 1.4.x
41
     * @deprecated since 1.4.x
42
     */
42
     */
43
    public void copyFile(String sourceFile, String destFile, boolean filtering,
43
    public void copyFile(File sourceFile, File destFile, boolean filtering,
44
                         boolean overwrite) throws IOException {
44
                         boolean overwrite) throws IOException {
45
        FILE_UTILS.copyFile(sourceFile, destFile,
45
        FILE_UTILS.copyFile(sourceFile, destFile,
46
            filtering ? globalFilters : null, overwrite);
46
            filtering ? globalFilters : null, overwrite);
47
    }
47
    }
48
    /**
48
    /**
49
     * Convenience method to copy a file from a source to a
49
     * Convenience method to copy a file from a source to a
50
     * destination specifying if token filtering should be used, if
50
     * destination specifying if token filtering should be used, if
51
     * source files may overwrite newer destination files, and if the
51
     * source files may overwrite newer destination files, and if the
52
     * last modified time of the resulting file should be set to
52
     * last modified time of the resulting file should be set to
53
     * that of the source file.
53
     * that of the source file.
54
     *
54
     *
55
     * @param sourceFile Name of file to copy from.
55
     * @param sourceFile File to copy from.
56
     *                   Must not be <code>null</code>.
56
     *                   Must not be <code>null</code>.
57
     * @param destFile Name of file to copy to.
57
     * @param destFile File to copy to.
58
     *                 Must not be <code>null</code>.
58
     *                 Must not be <code>null</code>.
59
     * @param filtering Whether or not token filtering should be used during
59
     * @param filtering Whether or not token filtering should be used during
60
     *                  the copy.
60
     *                  the copy.
61
     * @param overwrite Whether or not the destination file should be
61
     * @param overwrite Whether or not the destination file should be
62
     *                  overwritten if it already exists.
62
     *                  overwritten if it already exists.
63
     * @param preserveLastModified Whether or not the last modified time of
63
     * @param preserveLastModified Whether or not the last modified time of
64
     *                             the resulting file should be set to that
64
     *                             the resulting file should be set to that
65
     *                             of the source file.
65
     *                             of the source file.
66
     *
66
     *
67
     * @exception IOException if the copying fails.
67
     * @exception IOException if the file cannot be copied.
68
     *
68
     *
69
     * @deprecated since 1.4.x
69
     * @deprecated since 1.4.x
70
     */
70
     */
71
    public void copyFile(String sourceFile, String destFile, boolean filtering,
71
    public void copyFile(File sourceFile, File destFile, boolean filtering,
72
                         boolean overwrite, boolean preserveLastModified)
72
                         boolean overwrite, boolean preserveLastModified)
73
        throws IOException {
73
        throws IOException {
74
        FILE_UTILS.copyFile(sourceFile, destFile,
74
        FILE_UTILS.copyFile(sourceFile, destFile,
75
            filtering ? globalFilters : null, overwrite, preserveLastModified)
75
            filtering ? globalFilters : null, overwrite, preserveLastModified)
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