try { URL base = new URL("file://."); new URL(base, la.getHref()); link = la.getHref(); } catch (MalformedURLException mue) { // ok - just skip log("Link href \"" + la.getHref() + "\" is not a valid url - skipping link", Project.MSG_WARN); continue; }
try { Class clazz = Class.forName(PACKAGE + "Xalan2Executor"); executor = (XalanExecutor) clazz.newInstance(); } catch (Exception xsltcApacheMissing) { caller.task.log(xsltcApacheMissing.toString()); throw new BuildException("Could not find xstlc nor xalan2 " + "in the classpath. Check " + "http://xml.apache.org/xalan-j"); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Javadoc.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/XalanExecutor.java
Method name: void execute() Method name: XalanExecutor newInstance(AggregateTransformer)
Number of AST nodes: 4 Number of AST nodes: 3
1
try {
1
try {
2
                        URL base = new URL("file://.");
2
            Class clazz = Class.forName(PACKAGE + "Xalan2Executor");
3
                        new URL(base, la.getHref());
3
            
4
                        link = la.getHref();
5
                    } catch (MalformedURLException mue) {
6
                        // ok - just skip
7
                        log("Link href \"" + la.getHref()
8
                            + "\" is not a valid url - skipping link",
9
                            Project.MSG_WARN);
10
                        continue;
11
            
4
executor = (XalanExecutor) clazz.newInstance();
5
        } catch (Exception xsltcApacheMissing) {
6
            caller.task.log(xsltcApacheMissing.toString());
7
                throw new BuildException("Could not find xstlc nor xalan2 "
8
                                         + "in the classpath. Check "
9
                                         + "http://xml.apache.org/xalan-j");
12
        }
10
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons1