void setFileMode(String octalString) { checkArchiveAttributesAllowed(); integerSetFileMode(Integer.parseInt(octalString, BASE_OCTAL)); } /** * specify the user, group and * other modes in the standard Unix fashion; * optional, default=0644 * * <p>We use the strange name so this method doesn't appear in * IntrospectionHelpers list of attribute setters.</p> * @param mode a <code>int</code> value * @since Ant 1.7 */ public void integerSetFileMode(int mode) { fileModeHasBeenSet = true; this.fileMode = UnixStat.FILE_FLAG | mode; } /** * Get the mode of the archive fileset * @param p the project to use * @return the mode */ public int getFileMode(Project p) { if (isReference()) { return ((ArchiveFileSet) getRef(p)).getFileMode(p); } return fileMode; } /** * Whether the user has specified the mode explicitly. * @return true if it has been set */ public boolean hasFileModeBeenSet() { if (isReference()) { return ((ArchiveFileSet) getRef(getProject())).hasFileModeBeenSet(); } return fileModeHasBeenSet;
void setDirMode(String octalString) { checkArchiveAttributesAllowed(); integerSetDirMode(Integer.parseInt(octalString, BASE_OCTAL)); } /** * specify the user, group and * other modes in the standard Unix fashion; * optional, default=0755 * <p>We use the strange name so this method doesn't appear in * IntrospectionHelpers list of attribute setters.</p> * @param mode a <code>int</code> value * @since Ant 1.7 */ public void integerSetDirMode(int mode) { dirModeHasBeenSet = true; this.dirMode = UnixStat.DIR_FLAG | mode; } /** * Get the dir mode of the archive fileset * @param p the project to use * @return the mode */ public int getDirMode(Project p) { if (isReference()) { return ((ArchiveFileSet) getRef(p)).getDirMode(p); } return dirMode; } /** * Whether the user has specified the mode explicitly. * * @return true if it has been set */ public boolean hasDirModeBeenSet() { if (isReference()) { return ((ArchiveFileSet) getRef(getProject())).hasDirModeBeenSet(); } return dirModeHasBeenSet;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ArchiveFileSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/ArchiveFileSet.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setFileMode(String octalString) {
1
void setDirMode(String octalString) {
2
        checkArchiveAttributesAllowed();
2
        checkArchiveAttributesAllowed();
3
        integerSetFileMode(Integer.parseInt(octalString, BASE_OCTAL));
3
        integerSetDirMode(Integer.parseInt(octalString, BASE_OCTAL));
4
    }
4
    }
5
    /**
5
    /**
6
     * specify the user, group and
6
     * specify the user, group and
7
     * other modes in the standard Unix fashion;
7
     * other modes in the standard Unix fashion;
8
     * optional, default=0644
8
     * optional, default=0
9
     *
9
755
10
     * <p>We use the strange name so this method doesn't appear in
10
     * <p>We use the strange name so this method doesn't appear in
11
     * IntrospectionHelpers list of attribute setters.</p>
11
     * IntrospectionHelpers list of attribute setters.</p>
12
     * @param mode a <code>int</code> value
12
     * @param mode a <code>int</code> value
13
     * @since Ant 1.7
13
     * @since Ant 1.7
14
     */
14
     */
15
    public void integerSetFileMode(int mode) {
15
    public void integerSetDirMode(int mode) {
16
        fileModeHasBeenSet = true;
16
        dirModeHasBeenSet = true;
17
        this.fileMode = UnixStat.FILE_FLAG | mode;
17
        this.dirMode = UnixStat.DIR_FLAG | mode;
18
    }
18
    }
19
    /**
19
    /**
20
     * Get the mode of the archive fileset
20
     * Get the dir mode of the archive fileset
21
     * @param p the project to use
21
     * @param p the project to use
22
     * @return the mode
22
     * @return the mode
23
     */
23
     */
24
    public int getFileMode(Project p) {
24
    public int getDirMode(Project p) {
25
        if (isReference()) {
25
        if (isReference()) {
26
            return ((ArchiveFileSet) getRef(p)).getFileMode(p);
26
            return ((ArchiveFileSet) getRef(p)).getDirMode(p);
27
        }
27
        }
28
        return fileMode;
28
        return dirMode;
29
    }
29
    }
30
    /**
30
    /**
31
     * Whether the user has specified the mode explicitly.
31
     * Whether the user has specified the mode explicitly.
32
     *
32
     * @return true if it has been set
33
     * @return true if it has been set
33
     */
34
     */
34
    public boolean hasFileModeBeenSet() {
35
    public boolean hasDirModeBeenSet() {
35
        if (isReference()) {
36
        if (isReference()) {
36
            return ((ArchiveFileSet) getRef(getProject())).hasFileModeBeenSet();
37
            return ((ArchiveFileSet) getRef(getProject())).hasDirModeBeenSet();
37
        }
38
        }
38
        return fileModeHasBeenSet;
39
        return dirModeHasBeenSet;
39
    
40
    
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