File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName); if (jbossCMPD.exists()) { ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD); } else { log("Unable to locate jboss cmp descriptor. " + "It was expected to be in " + jbossCMPD.getPath(), Project.MSG_VERBOSE); return; }
File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD); if (weblogicDD.exists()) { ejbFiles.put(META_DIR + WL_DD, weblogicDD); } else { log("Unable to locate weblogic deployment descriptor. " + "It was expected to be in " + weblogicDD.getPath(), Project.MSG_WARN); return; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Method name: void addVendorFiles(Hashtable, String) Method name: void addVendorFiles(Hashtable, String)
Number of AST nodes: 5 Number of AST nodes: 5
1
File jbossCMPD
1
File 
2
            = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);
2
weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD);
3
        if (jbossCMPD.exists()) {
3
        if (weblogicDD.exists()) {
4
            ejbFiles.put(META_DIR + descriptorFileName, jbossCMP
4
            ejbFiles.put(META_DIR + WL_DD,
5
D);
5
                weblogicDD);
6
        } else {
6
        } else {
7
            log("Unable to locate jboss cmp descriptor. "
7
            log("Unable to locate weblogic deployment descriptor. "
8
                + "It was expected to be in "
8
                + "It was expected to be in "
9
                + jbossCMPD.getPath(), Project.MSG_VERBOSE);
9
                + weblogicDD.getPath(), Project.MSG_WARN);
10
            return;
10
            return;
11
        }
11
        }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons17
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    9
    File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);
    9
    File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);
    1
    File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD);
    Differences
    Expression1Expression2Difference
    jbossCMPDweblogicDDVARIABLE_NAME_MISMATCH
    descriptorFileNameWL_DDVARIABLE_NAME_MISMATCH
    1
    File weblogicDD = new File(getConfig().descriptorDir, ddPrefix + WL_DD);
    10
    if (jbossCMPD.exists())
    10
    if (jbossCMPD.exists())
    2
    if (weblogicDD.exists())
    Differences
    Expression1Expression2Difference
    jbossCMPDweblogicDDVARIABLE_NAME_MISMATCH
    2
    if (weblogicDD.exists())
    11
    ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD);
    11
    ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD);
    3
    ejbFiles.put(META_DIR + WL_DD, weblogicDD);
    Differences
    Expression1Expression2Difference
    descriptorFileNameWL_DDVARIABLE_NAME_MISMATCH
    jbossCMPDweblogicDDVARIABLE_NAME_MISMATCH
    3
    ejbFiles.put(META_DIR + WL_DD, weblogicDD);
    else
    else
    12
    log("Unable to locate jboss cmp descriptor. " + "It was expected to be in " + jbossCMPD.getPath(), Project.MSG_VERBOSE);
    12
    log("Unable to locate jboss cmp descriptor. " + "It was expected to be in " + jbossCMPD.getPath(), Project.MSG_VERBOSE);
    4
    log("Unable to locate weblogic deployment descriptor. " + "It was expected to be in " + weblogicDD.getPath(), Project.MSG_WARN);
    Differences
    Expression1Expression2Difference
    jbossCMPDweblogicDDVARIABLE_NAME_MISMATCH
    "Unable to locate jboss cmp descriptor. ""Unable to locate weblogic deployment descriptor. "LITERAL_VALUE_MISMATCH
    MSG_VERBOSEMSG_WARNVARIABLE_NAME_MISMATCH
    4
    log("Unable to locate weblogic deployment descriptor. " + "It was expected to be in " + weblogicDD.getPath(), Project.MSG_WARN);
    13
    return;
    13
    return;
    5
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    5
    return;
    Precondition Violations (3)
    Row Violation
    1Conditional return;
    2Conditional return;
    3Clone fragment #1 returns variables , while Clone fragment #2 returns variables weblogicDD