void getNusersCommand(Commandline cmd) { if (getNusers() == null) { return; } else { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_NUSERS); cmd.createArgument().setValue(getNusers()); } } /** * Get the 'comment' command * * @param cmd containing the command line string with or without the * comment flag and value appended */ private void getCommentCommand(Commandline cmd) { if (getComment() == null) { return; } else { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); }
void getCommentCommand(Commandline cmd) { if (getComment() == null) { return; } else { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_COMMENT); cmd.createArgument().setValue(getComment()); } } /** * Get the 'pname' command * * @param cmd containing the command line string with or * without the pname flag and value appended */ private void getPnameCommand(Commandline cmd) { if (getPname() == null) { return; } else { /* Had to make two separate commands here because if a space is inserted between the flag and the value, it is treated as a Windows filename with a space and it is enclosed in double quotes ("). This breaks clearcase. */ cmd.createArgument().setValue(FLAG_PNAME); cmd.createArgument().setValue(getPname()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void getNusersCommand(Commandline cmd) {
1
void getCommentCommand(Commandline cmd) {
2
        if (getNusers() == null) {
2
        if (getComment() == null) {
3
            return;
3
            return;
4
        } else {
4
        } else {
5
            /* Had to make two separate commands here because if a space is
5
            /* Had to make two separate commands here because if a space is
6
               inserted between the flag and the value, it is treated as a
6
               inserted between the flag and the value, it is treated as a
7
               Windows filename with a space and it is enclosed in double
7
               Windows filename with a space and it is enclosed in double
8
               quotes ("). This breaks clearcase.
8
               quotes ("). This breaks clearcase.
9
            */
9
            */
10
            cmd.createArgument().setValue(FLAG_NUSERS);
10
            cmd.createArgument().setValue(FLAG_COMMENT);
11
            cmd.createArgument().setValue(getNusers());
11
            cmd.createArgument().setValue(getComment());
12
        }
12
        }
13
    }
13
    }
14
    /**
14
    /**
15
     * Get the 'comment' command
15
     * Get the 'pname' command
16
     *
16
     *
17
     * @param cmd containing the command line string with or without the
17
     * @param cmd containing the command line string with or
18
     *            comment flag and value appended
18
     *            without the pname flag and value appended
19
     */
19
     */
20
    private void getCommentCommand(Commandline cmd) {
20
    private void getPnameCommand(Commandline cmd) {
21
        if (getComment() == null) {
21
        if (getPname() == null) {
22
            return;
22
            return;
23
        } else {
23
        } else {
24
            /* Had to make two separate commands here because if a space is
24
            /* Had to make two separate commands here because if a space is
25
               inserted between the flag and the value, it is treated as a
25
               inserted between the flag and the value, it is treated as a
26
               Windows filename with a space and it is enclosed in double
26
               Windows filename with a space and it is enclosed in double
27
               quotes ("). This breaks clearcase.
27
               quotes ("). This breaks clearcase.
28
            */
28
            */
29
            cmd.createArgument().setValue(FLAG_COMMENT);
29
            cmd.createArgument().setValue(FLAG_PNAME);
30
            cmd.createArgument().setValue(getComment());
30
            cmd.createArgument().setValue(getPname());
31
        }
31
        }
32
    
32
    
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