throw new BuildException("Destfile must be set."); } if (null == mystartTag && null == mystartDate) { throw new BuildException("Start tag or start date must be set."); } if (null != mystartTag && null != mystartDate) { throw new BuildException("Only one of start tag and start date " + "must be set."); }
throw new BuildException("Only one of start tag and start date " + "must be set."); } if (null == myendTag && null == myendDate) { throw new BuildException("End tag or end date must be set."); } if (null != myendTag && null != myendDate) { throw new BuildException("Only one of end tag and end date must " + "be set."); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
Method name: void validate() Method name: void validate()
Number of AST nodes: 5 Number of AST nodes: 5
1
throw new BuildException("Destfile 
1
throw new BuildException("Only one of start tag and start date "
2
must be set.");
2
                                     + "must be set.");
3
        }
3
        }
4
        if (null == mystartTag && null == mystartDate) {
4
        if (null == myendTag && null == myendDate) {
5
            throw new BuildException("Start tag or start date must be set.");
5
            throw new BuildException("End tag or end date must be set.");
6
        }
6
        }
7
        if (null != mystartTag && null != mystartDate) {
7
        if (null != myendTag && null != myendDate) {
8
            throw new BuildException("Only one of start tag and start date "
8
            throw new BuildException("Only one of end tag and end date must "
9
                                     + "must be set.");
9
                                     + "be set.");
10
        }
10
        }
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.4
Clones locationClones are in the same method
Number of node comparisons13
  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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    if (null == mystartTag && null == mystartDate)
    5
    if (null == mystartTag && null == mystartDate)
    9
    if (null == myendTag && null == myendDate)
    Differences
    Expression1Expression2Difference
    mystartTagmyendTagVARIABLE_NAME_MISMATCH
    mystartDatemyendDateVARIABLE_NAME_MISMATCH
    9
    if (null == myendTag && null == myendDate)
    6
    throw new BuildException("Start tag or start date must be set.");
    6
    throw new BuildException("Start tag or start date must be set.");
    10
    throw new BuildException("End tag or end date must be set.");
    Differences
    Expression1Expression2Difference
    "Start tag or start date must be set.""End tag or end date must be set."LITERAL_VALUE_MISMATCH
    10
    throw new BuildException("End tag or end date must be set.");
    7
    if (null != mystartTag && null != mystartDate)
    7
    if (null != mystartTag && null != mystartDate)
    11
    if (null != myendTag && null != myendDate)
    Differences
    Expression1Expression2Difference
    mystartTagmyendTagVARIABLE_NAME_MISMATCH
    mystartDatemyendDateVARIABLE_NAME_MISMATCH
    11
    if (null != myendTag && null != myendDate)
    8
    throw new BuildException("Only one of start tag and start date " + "must be set.");
    8
    throw new BuildException("Only one of start tag and start date " + "must be set.");
    12
    throw new BuildException("Only one of end tag and end date must " + "be set.");
    Differences
    Expression1Expression2Difference
    "Only one of start tag and start date ""Only one of end tag and end date must "LITERAL_VALUE_MISMATCH
    "must be set.""be set."LITERAL_VALUE_MISMATCH
    12
    throw new BuildException("Only one of end tag and end date must " + "be set.");
    Precondition Violations (0)
    Row Violation