if (iasDescriptor == null) { msg += "An iAS-specific XML descriptor file must be specified. "; } if (classpath == null) { msg += "A classpath must be specified. "; } if (parser == null) { msg += "An XML parser must be specified. "; } if (destDirectory == null) { msg += "A destination directory must be specified. ";
if (stdDescriptor == null) { msg += "A standard XML descriptor file must be specified. "; } if (iasDescriptor == null) { msg += "An iAS-specific XML descriptor file must be specified. "; } if (classpath == null) { msg += "A classpath must be specified. "; } if (parser == null) { msg += "An XML parser must be specified. "; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
Method name: void checkConfiguration() Method name: void checkConfiguration()
Number of AST nodes: 7 Number of AST nodes: 8
1
if (stdDescriptor == null) {
2
            msg += "A standard XML descriptor file must be specified.  ";
3
        }
1
if (iasDescriptor == null) {
4
        if (iasDescriptor == null) {
2
            msg += "An iAS-specific XML descriptor file must be specified.  ";
5
            msg += "An iAS-specific XML descriptor file must be specified.  ";
3
        }
6
        }
4
        if (classpath == null) {
7
        if (classpath == null) {
5
            msg += "A classpath must be specified.    ";
8
            msg += "A classpath must be specified.    ";
6
        }
9
        }
7
        if (parser == null) {
10
        if (parser == null) {
8
            msg += "An XML parser must be specified.    ";
11
            msg += "An XML parser must be specified.    ";
9
        }
12
        }
10
        if (destDirectory == null) {
11
            msg += "A destination directory must be specified.  ";
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons30
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    if (iasDescriptor == null)
    4
    if (iasDescriptor == null)
    5
    msg += "An iAS-specific XML descriptor file must be specified.  ";
    5
    msg += "An iAS-specific XML descriptor file must be specified.  ";
    6
    if (classpath == null)
    6
    if (classpath == null)
    7
    msg += "A classpath must be specified.    ";
    7
    msg += "A classpath must be specified.    ";
    8
    if (parser == null)
    8
    if (parser == null)
    2
    if (stdDescriptor == null)
    Differences
    Expression1Expression2Difference
    parserstdDescriptorVARIABLE_NAME_MISMATCH
    javax.xml.parsers.SAXParserjava.io.FileVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.xml.parsers.SAXParser of variable parser does not match with type java.io.File of variable stdDescriptor
    • Make classes javax.xml.parsers.SAXParser and java.io.File extend a common superclass
    2
    if (stdDescriptor == null)
    9
    msg += "An XML parser must be specified.    ";
    9
    msg += "An XML parser must be specified. ";
    3
    msg += "A standard XML descriptor file must be specified. ";
    Differences
    Expression1Expression2Difference
    "An XML parser must be specified. ""A standard XML descriptor file must be specified. "LITERAL_VALUE_MISMATCH
    3
    msg += "A standard XML descriptor file must be specified.  ";
    Precondition Violations (1)
    Row Violation
    1Type javax.xml.parsers.SAXParser of variable parser does not match with type java.io.File of variable stdDescriptor