void getVersionCommand(Commandline cmd) { if (getVersion() != null) { /* 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_VERSION); cmd.createArgument().setValue(getVersion()); } } /** * Get the 'comment' command * * @param cmd containing the command line string with or * without the comment flag and string appended */ private void getCommentCommand(Commandline cmd) { if (getComment() != null) { /* 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 'commentfile' command * * @param cmd containing the command line string with or * without the commentfile flag and file appended */ private void getCommentFileCommand(Commandline cmd) { if (getCommentFile() != null) { /* 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_COMMENTFILE); cmd.createArgument().setValue(getCommentFile()); }
void getOutCommand(Commandline cmd) { if (getOut() != null) { /* 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_OUT); cmd.createArgument().setValue(getOut()); } } /** * Get the 'branch' command * * @param cmd containing the command line string with or without the branch flag and name appended */ private void getBranchCommand(Commandline cmd) { if (getBranch() != null) { /* 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_BRANCH); cmd.createArgument().setValue(getBranch()); } } /** * Get the 'comment' command * * @param cmd containing the command line string with or * without the comment flag and string appended */ private void getCommentCommand(Commandline cmd) { if (getComment() != null) { /* 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()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void getVersionCommand(Commandline cmd) {
1
void getOutCommand(Commandline cmd) {
2
        if (getVersion() != null) {
2
        if (getOut() != null) {
3
            /* Had to make two separate commands here because if a space is
3
            /* Had to make two separate commands here because if a space is
4
               inserted between the flag and the value, it is treated as a
4
               inserted between the flag and the value, it is treated as a
5
               Windows filename with a space and it is enclosed in double
5
               Windows filename with a space and it is enclosed in double
6
               quotes ("). This breaks clearcase.
6
               quotes ("). This breaks clearcase.
7
            */
7
            */
8
            cmd.createArgument().setValue(FLAG_VERSION);
8
            cmd.createArgument().setValue(FLAG_OUT);
9
            cmd.createArgument().setValue(getVersion());
9
            cmd.createArgument().setValue(getOut());
10
        }
10
        }
11
    }
11
    }
12
    /**
12
    /**
13
     * Get the 'comment' command
13
     * Get the 'branch' command
14
     *
14
     *
15
     * @param cmd containing the command line string with or
15
     * @param cmd containing the command line string with or
16
     *        without the comment flag and string appended
16
                          without the branch flag and name appended
17
     */
17
     */
18
    private void getCommentCommand(Commandline cmd) {
18
    private void getBranchCommand(Commandline cmd) {
19
        if (getComment() != null) {
19
        if (getBranch() != null) {
20
            /* Had to make two separate commands here because if a space is
20
            /* Had to make two separate commands here because if a space is
21
               inserted between the flag and the value, it is treated as a
21
               inserted between the flag and the value, it is treated as a
22
               Windows filename with a space and it is enclosed in double
22
               Windows filename with a space and it is enclosed in double
23
               quotes ("). This breaks clearcase.
23
               quotes ("). This breaks clearcase.
24
            */
24
            */
25
            cmd.createArgument().setValue(FLAG_COMMENT);
25
            cmd.createArgument().setValue(FLAG_BRANCH);
26
            cmd.createArgument().setValue(getComment());
26
            cmd.createArgument().setValue(getBranch());
27
        }
27
        }
28
    }
28
    }
29
    /**
29
    /**
30
     * Get the 'commentfile' command
30
     * Get the 'comment' command
31
     *
31
     *
32
     * @param cmd         containing the command line string with or
32
     * @param cmd containing the command line string with or
33
     *                    without the commentfile flag and file appended
33
     *                    without the comment flag and string appended
34
     */
34
     */
35
    private void getCommentFileCommand(Commandline cmd) {
35
    private void getCommentCommand(Commandline cmd) {
36
        if (getCommentFile() != null) {
36
        if (getComment() != null) {
37
            /* Had to make two separate commands here because if a space is
37
            /* Had to make two separate commands here because if a space is
38
               inserted between the flag and the value, it is treated as a
38
               inserted between the flag and the value, it is treated as a
39
               Windows filename with a space and it is enclosed in double
39
               Windows filename with a space and it is enclosed in double
40
               quotes ("). This breaks clearcase.
40
               quotes ("). This breaks clearcase.
41
            */
41
            */
42
            cmd.createArgument().setValue(FLAG_COMMENTFILE);
42
            cmd.createArgument().setValue(FLAG_COMMENT);
43
            cmd.createArgument().setValue(getCommentFile());
43
            cmd.createArgument().setValue(getComment());
44
        }
44
        }
45
    
45
    
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