String msg = "\"" + f.getPath() + "\" does not represent a valid" + " file or directory. JDepend would fail."; log(msg); throw new BuildException(msg); } try { jdepend.addDirectory(f.getPath()); } catch (IOException e) { String msg = "JDepend Failed when adding a class directory: " + e.getMessage(); log(msg); throw new BuildException(msg); }
String msg = "\"" + f.getPath() + "\" does not represent a valid" + " directory. JDepend would fail."; log(msg); throw new BuildException(msg); } try { jdepend.addDirectory(f.getPath()); } catch (IOException e) { String msg = "JDepend Failed when adding a source directory: " + e.getMessage(); log(msg); throw new BuildException(msg); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
Method name: int executeInVM(CommandlineJava) Method name: int executeInVM(CommandlineJava)
Number of AST nodes: 5 Number of AST nodes: 5
1
String msg = "\""
1
String msg = "\""
2
                            + f.getPath()
2
                            + f.getPath()
3
                            + "\" does not represent a valid"
3
                            + "\" does not represent a valid"
4
                            + " file or directory. JDepend would fail.";
4
                            + " directory. JDepend would fail.";
5
                        log(msg);
5
                        log(msg);
6
                        throw new BuildException(msg);
6
                        throw new BuildException(msg);
7
                    }
7
                    }
8
                    try {
8
                    try {
9
                        jdepend.addDirectory(f.getPath());
9
                        jdepend.addDirectory(f.getPath());
10
                    } catch (IOException e) {
10
                    } catch (IOException e) {
11
                        String msg =
11
                        String msg =
12
                            "JDepend Failed when adding a class directory: "
12
                            "JDepend Failed when adding a source directory: "
13
                            + e.getMessage();
13
                            + e.getMessage();
14
                        log(msg);
14
                        log(msg);
15
                        throw new BuildException(msg);
15
                        throw new BuildException(msg);
16
                    }
16
                    }
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.5
Clones locationClones are in the same method
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)9.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    try
    20
    try
    30
    try
    Differences
    Expression1Expression2Difference
    "JDepend Failed when adding a class directory: ""JDepend Failed when adding a source directory: "LITERAL_VALUE_MISMATCH
    30
    try
    21
    jdepend.addDirectory(f.getPath());
    31
    jdepend.addDirectory(f.getPath());
    Precondition Violations (0)
    Row Violation