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()); } } /** * Get the 'element type' command * * @param cmd containing the command line string with or * without the comment flag and string appended */ private void getEltypeCommand(Commandline cmd) { if (getEltype() != 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_ELTYPE); cmd.createArgument().setValue(getEltype()); }
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()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkelem.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void getCommentCommand(Commandline cmd) {
1
void getVersionCommand(Commandline cmd) {
2
        if (getComment() != null) {
2
        if (getVersion() != 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_COMMENT);
8
            cmd.createArgument().setValue(FLAG_VERSION);
9
            cmd.createArgument().setValue(getComment());
9
            cmd.createArgument().setValue(getVersion());
10
        }
10
        }
11
    }
11
    }
12
    /**
12
    /**
13
     * Get the 'commentfile' command
13
     * Get the 'comment' 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 commentfile flag and file appended
16
     *        without the comment flag and string appended
17
     */
17
     */
18
    private void getCommentFileCommand(Commandline cmd) {
18
    private void getCommentCommand(Commandline cmd) {
19
        if (getCommentFile() != null) {
19
        if (getComment() != 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_COMMENTFILE);
25
            cmd.createArgument().setValue(FLAG_COMMENT);
26
            cmd.createArgument().setValue(getCommentFile());
26
            cmd.createArgument().setValue(getComment());
27
        }
27
        }
28
    }
28
    }
29
    /**
29
    /**
30
     * Get the 'element type' command
30
     * Get the 'commentfile' 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 comment flag and string appended
33
     *                    without the commentfile flag and file appended
34
     */
34
     */
35
    private void getEltypeCommand(Commandline cmd) {
35
    private void getCommentFileCommand(Commandline cmd) {
36
        if (getEltype() != null) {
36
        if (getCommentFile() != 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_ELTYPE);
42
            cmd.createArgument().setValue(FLAG_COMMENTFILE);
43
            cmd.createArgument().setValue(getEltype());
43
            cmd.createArgument().setValue(getCommentFile());
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