if (getVssServerPath() == null) { throw new BuildException("vssserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(FLAG_VSS_SERVER); commandLine.createArgument().setValue(getVssServerPath());
if (getLabel() == null) { throw new BuildException("label attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL); commandLine.createArgument().setValue(getLabel());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOS.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java
Method name: void getRequiredAttributes() Method name: Commandline buildCmdLine()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (getVssServerPath() == null) {
1
if (getLabel() == null) {
2
            throw new BuildException("vssserverpath attribute must be set!", getLocation());
2
            throw new BuildException("label attribute must be set!", getLocation());
3
        }
3
        }
4
        commandLine.createArgument().setValue(FLAG_VSS_SERVER);
4
        commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);
5
        commandLine.createArgument().setValue(getVssServerPath());
5
        commandLine.createArgument().setValue(getLabel());
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons8
  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)2.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    12
    if (getVssServerPath() == null)
    12
    if (getVssServerPath() == null)
    5
    if (getLabel() == null)
    Differences
    Expression1Expression2Difference
    getVssServerPathgetLabelMETHOD_INVOCATION_NAME_MISMATCH
    5
    if (getLabel() == null)
    13
    throw new BuildException("vssserverpath attribute must be set!", getLocation());
    13
    throw new BuildException("vssserverpath attribute must be set!", getLocation());
    6
    throw new BuildException("label attribute must be set!", getLocation());
    Differences
    Expression1Expression2Difference
    "vssserverpath attribute must be set!""label attribute must be set!"LITERAL_VALUE_MISMATCH
    6
    throw new BuildException("label attribute must be set!", getLocation());
    14
    commandLine.createArgument().setValue(FLAG_VSS_SERVER);
    14
    commandLine.createArgument().setValue(FLAG_VSS_SERVER);
    7
    commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);
    Differences
    Expression1Expression2Difference
    FLAG_VSS_SERVERSOSCmd.FLAG_LABELTYPE_COMPATIBLE_REPLACEMENT
    7
    commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL);
    15
    commandLine.createArgument().setValue(getVssServerPath());
    15
    commandLine.createArgument().setValue(getVssServerPath());
    8
    commandLine.createArgument().setValue(getLabel());
    Differences
    Expression1Expression2Difference
    getVssServerPathgetLabelMETHOD_INVOCATION_NAME_MISMATCH
    8
    commandLine.createArgument().setValue(getLabel());
    Precondition Violations (0)
    Row Violation