if (processor != null) { try { resolveProcessor(processor); } catch (Exception e) { throw new BuildException(e); } } else { try { resolveProcessor(PROCESSOR_TRAX); } catch (Throwable e1) { e1.printStackTrace(); throw new BuildException(e1); } }
try { props.store(os, header); } catch (IOException ioe) { throw new BuildException(ioe, getLocation()); } finally { if (os != null) { try { os.close(); } catch (IOException ioex) { log("Failed to close output stream"); } } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/XSLTProcess.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
Method name: XSLTLiaison getLiaison() Method name: void jdkSaveProperties(Properties, OutputStream, String)
Number of AST nodes: 5 Number of AST nodes: 2
1
if (processor != null) {
2
                try {
3
                    resolveProcessor(processor);
4
    
1
try {
2
           props.store(os, header);
5
            } catch (Exception e) {
3
       } catch (IOException ioe) {
6
                    throw new BuildException(e);
4
           throw new BuildException(ioe, getLocation());
7
                }
5
       } finally {
8
            } else {
6
           if (os != null) {
9
                try {
7
               try {
10
                    resolveProcessor(PROCESSOR_TRAX);
8
                   os.close();
11
                } catch (Throwable e1) {
9
               } catch (IOException ioex) {
12
                    e1.printStackTrace();
10
                   
13
                    throw new BuildException(e1);
14
                }
15
     
11
log("Failed to close output stream");
12
               }
13
           }
16
       }
14
       }
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 having the same super class
Number of node comparisons2