if (hrefAsFile.exists()) { try { link = FILE_UTILS.getFileURL(hrefAsFile) .toExternalForm(); } catch (MalformedURLException ex) { // should be impossible log("Warning: link location was invalid " + hrefAsFile, Project.MSG_WARN); } }
if (error == null) { try { assertEquals(expectedBasedirs[calls++], event.getProject().getBaseDir().getAbsolutePath()); } catch (AssertionFailedError e) { error = e; } }
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/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java
Method name: void execute() Method name: void targetStarted(BuildEvent)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (hrefAsFile.exists()) {
1
if (
2
        
2
error == null) {
3
                try {
3
                try {
4
                            link = FILE_UTILS.getFileURL(hrefAsFile)
4
                    
5
                                .toExternalForm
5
assertEquals(expectedBasedirs[calls++],
6
();
6
                                 event.getProject().getBaseDir().getAbsolutePath());
7
                        } catch (MalformedURLException ex) {
7
                } catch (AssertionFailedError e) {
8
                            // should be impossible
8
                    
9
                            log("Warning: link location was invalid "
10
                                + hrefAsFile, Project.MSG_WARN);
11
     
9
error = e;
12
                   }
10
                
13
        
11
}
14
            }
12
            }
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.4
Clones locationClones are in different classes
Number of node comparisons1