void setUserName(String userName) { checkTarFileSetAttributesAllowed(); userNameSet = true; this.userName = userName; } /** * @return the user name for the tar entry */ public String getUserName() { if (isReference()) { return ((TarFileSet) getCheckedRef()).getUserName(); } return userName; } /** * @return whether the user name has been explicitly set. */ public boolean hasUserNameBeenSet() { return userNameSet; } /** * The uid for the tar entry * This is not the same as the User name. * @param uid the id of the user for the tar entry. */ public void setUid(int uid) { checkTarFileSetAttributesAllowed(); userIdSet = true; this.uid = uid; } /** * @return the uid for the tar entry */ public int getUid() { if (isReference()) { return ((TarFileSet) getCheckedRef()).getUid(); } return uid;
void setGroup(String groupName) { checkTarFileSetAttributesAllowed(); groupNameSet = true; this.groupName = groupName; } /** * @return the group name string. */ public String getGroup() { if (isReference()) { return ((TarFileSet) getCheckedRef()).getGroup(); } return groupName; } /** * @return whether the group name has been explicitly set. */ public boolean hasGroupBeenSet() { return groupNameSet; } /** * The GID for the tar entry; optional, default="0" * This is not the same as the group name. * @param gid the group id. */ public void setGid(int gid) { checkTarFileSetAttributesAllowed(); groupIdSet = true; this.gid = gid; } /** * @return the group identifier. */ public int getGid() { if (isReference()) { return ((TarFileSet) getCheckedRef()).getGid(); } return gid;
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/TarFileSet.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/TarFileSet.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void setUserName(String userName) {
1
void setGroup(String groupName) {
2
        checkTarFileSetAttributesAllowed();
2
        checkTarFileSetAttributesAllowed();
3
        userNameSet = true;
3
        groupNameSet = true;
4
        this.userName = userName;
4
        this.groupName = groupName;
5
    }
5
    }
6
    /**
6
    /**
7
     * @return the user name for the tar entry
7
     * @return the group name string.
8
     */
8
     */
9
    public String getUserName() {
9
    public String getGroup() {
10
        if (isReference()) {
10
        if (isReference()) {
11
            return ((TarFileSet) getCheckedRef()).getUserName();
11
            return ((TarFileSet) getCheckedRef()).getGroup();
12
        }
12
        }
13
        return userName;
13
        return groupName;
14
    }
14
    }
15
    /**
15
    /**
16
     * @return whether the user name has been explicitly set.
16
     * @return whether the group name has been explicitly set.
17
     */
17
     */
18
    public boolean hasUserNameBeenSet() {
18
    public boolean hasGroupBeenSet() {
19
        return userNameSet;
19
        return groupNameSet;
20
    }
20
    }
21
    /**
21
    /**
22
     * The uid for the tar entry
22
     * The GID for the tar entry; optional, default="0"
23
     * This is not the same as the User name.
23
     * This is not the same as the group name.
24
     * @param uid the id of the user for the tar entry.
24
     * @param gid the group id.
25
     */
25
     */
26
    public void setUid(int uid) {
26
    public void setGid(int gid) {
27
        checkTarFileSetAttributesAllowed();
27
        checkTarFileSetAttributesAllowed();
28
        userIdSet = true;
28
        groupIdSet = true;
29
        this.uid = uid;
29
        this.gid = gid;
30
    }
30
    }
31
    /**
31
    /**
32
     * @return the uid for the tar entry
32
     * @return the group identifier.
33
     */
33
     */
34
    public int getUid() {
34
    public int getGid() {
35
        if (isReference()) {
35
        if (isReference()) {
36
            return ((TarFileSet) getCheckedRef()).getUid();
36
            return ((TarFileSet) getCheckedRef()).getGid();
37
        }
37
        }
38
        return uid;
38
        return gid;
39
    
39
    
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