if ((cachefile != null) && cache.propertyNames().hasMoreElements()) { try { BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream(cachefile)); cache.store(bos, null); bos.flush(); bos.close(); } catch (Exception e) { e.printStackTrace(); } }
try { process.waitFor(); setExitValue(process.exitValue()); } catch (InterruptedException e) { process.destroy(); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/types/selectors/modifiedselector/PropertiesfileCache.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Execute.java
Method name: void save() Method name: void waitFor(Process)
Number of AST nodes: 6 Number of AST nodes: 3
1
if ((cachefile != null) && cache.propertyNames().hasMoreElements()) {
2
            try {
1
try {
3
                BufferedOutputStream bos = new BufferedOutputStream(
2
            
4
                      new FileOutputStream(cachefile));
3
process.waitFor();
5
                cache.store(bos, null);
4
            
6
                bos.flush();
7
                bos.close();
5
setExitValue(process.exitValue());
8
            } catch (Exception e) {
6
        } catch (InterruptedException e) {
9
                e.printStackTrace();
7
            
10
            }
8
process.destroy();
11
        }
9
        }
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