if ((cachefile != null) && cachefile.isFile() && cachefile.canRead()) { try { BufferedInputStream bis = new BufferedInputStream( new FileInputStream(cachefile)); cache.load(bis); bis.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 load() Method name: void waitFor(Process)
Number of AST nodes: 5 Number of AST nodes: 3
1
if ((cachefile != null) && cachefile.isFile() && cachefile.canRead()) {
2
            try {
3
                BufferedInputStream bis = new BufferedInputStream(
4
                    new FileInputStream(cachefile));
5
                cache.load(bis);
6
                bis.clos
1
try {
2
            process.waitFor();
7
e();
3
            setExitValue(process.exitValue());
8
            } catch (Exception e) {
4
        } catch (InterruptedException e) {
9
                e.printStackTrace();
5
            
10
            }
6
process.destroy();
11
        }
7
        }
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.3
Clones locationClones are in different classes
Number of node comparisons1