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 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/CCCheckin.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void getCommentCommand(Commandline cmd) {
1
void getCommentCommand(Commandline cmd) {
2
        if (getComment() != null) {
2
        if (getComment() != 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_COMMENT);
9
            cmd.createArgument().setValue(getComment());
9
            cmd.createArgument().setValue(getComment());
10
        }
10
        }
11
    }
11
    }
12
    /**
12
    /**
13
     * Get the 'commentfile' command
13
     * Get the 'commentfile' 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 commentfile flag and file appended
17
     */
17
     */
18
    private void getCommentFileCommand(Commandline cmd) {
18
    private void getCommentFileCommand(Commandline cmd) {
19
        if (getCommentFile() != null) {
19
        if (getCommentFile() != 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_COMMENTFILE);
26
            cmd.createArgument().setValue(getCommentFile());
26
            cmd.createArgument().setValue(getCommentFile());
27
        }
27
        }
28
    
28
    
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