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()); }
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/CCUnlock.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/clearcase/CCLock.java
Method name: void getPnameCommand(Commandline) Method name: void getPnameCommand(Commandline)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (getPname() == null) {
1
if (getPname() == null) {
2
            return;
2
            return;
3
        } else {
3
        } else {
4
            /* Had to make two separate commands here because if a space is
4
            /* Had to make two separate commands here because if a space is
5
               inserted between the flag and the value, it is treated as a
5
               inserted between the flag and the value, it is treated as a
6
               Windows filename with a space and it is enclosed in double
6
               Windows filename with a space and it is enclosed in double
7
               quotes ("). This breaks clearcase.
7
               quotes ("). This breaks clearcase.
8
            */
8
            */
9
            cmd.createArgument().setValue(FLAG_PNAME);
9
            cmd.createArgument().setValue(FLAG_PNAME);
10
            cmd.createArgument().setValue(getPname());
10
            cmd.createArgument().setValue(getPname());
11
        }
11
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (getPname() == null)
    1
    if (getPname() == null)
    2
    return;
    2
    return;
    else
    else
    3
    cmd.createArgument().setValue(FLAG_PNAME);
    3
    cmd.createArgument().setValue(FLAG_PNAME);
    4
    cmd.createArgument().setValue(getPname());
    4
    cmd.createArgument().setValue(getPname());
    Precondition Violations (0)
    Row Violation