if (iasdescriptor == null) { String msg = "The iAS-speific XML descriptor must be specified using" + " the \"iasdescriptor\" attribute."; throw new BuildException(msg, getLocation()); } if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile())) { String msg = "The iAS-specific XML descriptor (" + iasdescriptor + ") was not found or isn't a file."; throw new BuildException(msg, getLocation()); }
if (dest == null) { String msg = "The destination directory must be specified using " + "the \"dest\" attribute."; throw new BuildException(msg, getLocation()); } if ((!dest.exists()) || (!dest.isDirectory())) { String msg = "The destination directory (" + dest + ") was not " + "found or isn't a directory."; throw new BuildException(msg, getLocation()); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java
Method name: void checkConfiguration() Method name: void checkConfiguration()
Number of AST nodes: 6 Number of AST nodes: 6
1
if (iasdescriptor == null) {
1
if (dest == null) {
2
            String msg = "The iAS-speific XML descriptor must be specified using"
2
            String msg = "The destination directory must be specified using "
3
                            + " the \"iasdescriptor\" attribute.";
3
                            + "the \"dest\" attribute.";
4
            throw new BuildException(msg, getLocation());
4
            throw new BuildException(msg, getLocation());
5
        }
5
        }
6
        if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile())) {
6
        if ((!dest.exists()) || (!dest.isDirectory())) {
7
            String msg = "The iAS-specific XML descriptor (" + iasdescriptor
7
            String msg = "The destination directory (" + dest + ") was not "
8
                            + ") was not found or isn't a file.";
8
                            + "found or isn't a directory.";
9
            throw new BuildException(msg, getLocation());
9
            throw new BuildException(msg, getLocation());
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.3
Clones locationClones are in the same method
Number of node comparisons28
  1. {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
    7
    if (iasdescriptor == null)
    7
    if (iasdescriptor == null)
    13
    if (dest == null)
    Differences
    Expression1Expression2Difference
    iasdescriptordestVARIABLE_NAME_MISMATCH
    13
    if (dest == null)
    8
    String msg = "The iAS-speific XML descriptor must be specified using" + " the \"iasdescriptor\" attribute.";
    8
    String msg = "The iAS-speific XML descriptor must be specified using" + " the \"iasdescriptor\" attribute.";
    14
    String msg = "The destination directory must be specified using " + "the \"dest\" attribute.";
    Differences
    Expression1Expression2Difference
    "The iAS-speific XML descriptor must be specified using""The destination directory must be specified using "LITERAL_VALUE_MISMATCH
    " the \"iasdescriptor\" attribute.""the \"dest\" attribute."LITERAL_VALUE_MISMATCH
    14
    String msg = "The destination directory must be specified using " + "the \"dest\" attribute.";
    9
    throw new BuildException(msg, getLocation());
    15
    throw new BuildException(msg, getLocation());
    10
    if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile()))
    10
    if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile()))
    16
    if ((!dest.exists()) || (!dest.isDirectory()))
    Differences
    Expression1Expression2Difference
    iasdescriptordestVARIABLE_NAME_MISMATCH
    isFileisDirectoryMETHOD_INVOCATION_NAME_MISMATCH
    iasdescriptordestVARIABLE_NAME_MISMATCH
    16
    if ((!dest.exists()) || (!dest.isDirectory()))
    11
    String msg = "The iAS-specific XML descriptor (" + iasdescriptor + ") was not found or isn't a file.";
    11
    String msg = "The iAS-specific XML descriptor (" + iasdescriptor + ") was not found or isn't a file.";
    17
    String msg = "The destination directory (" + dest + ") was not " + "found or isn't a directory.";
    Differences
    Expression1Expression2Difference
    "The iAS-specific XML descriptor (""The destination directory ("LITERAL_VALUE_MISMATCH
    iasdescriptordestVARIABLE_NAME_MISMATCH
    "The iAS-specific XML descriptor (" + iasdescriptor + ") was not found or isn't a file.""The destination directory (" + dest + ") was not "+ "found or isn't a directory."INFIX_EXTENDED_OPERAND_NUMBER_MISMATCH
    17
    String msg = "The destination directory (" + dest + ") was not " + "found or isn't a directory.";
    12
    throw new BuildException(msg, getLocation());
    18
    throw new BuildException(msg, getLocation());
    Precondition Violations (0)
    Row Violation