InputStream is = url.openStream(); try { props.load(is); } finally { if (is != null) { is.close(); } } addProperties(props);
InputStream rIn = resource.getInputStream(); try { zipFile(rIn, zOut); } finally { rIn.close(); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Property.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Pack.java
Method name: void loadUrl(URL) Method name: void zipResource(Resource, OutputStream)
Number of AST nodes: 4 Number of AST nodes: 3
1
InputStream is = url.openStream();
1
InputStream rIn = resource.getInputStream();
2
            try {
2
        try {
3
                props.load(is);
3
            
4
    
4
zipFile(rIn, zOut);
5
        } finally {
5
        } finally {
6
                if (is != null) {
6
            
7
                    is.close();
7
rIn.close();
8
                }
8
        }
9
            }
10
            addProperties(props);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons1