149-3-4

ResultSet rs = statement.getResultSet(); try { printResults(rs, out); } finally { if (rs != null) { rs.close(); } }
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/SQLExec.java |  | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Pack.java
Method name: `void printResults(PrintStream)` |  | Method name: `void zipResource(Resource, OutputStream)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    ResultSet rs = statement.getResultSet();↵

1

    InputStream rIn = resource.getInputStream();↵

2

            try {↵

2

            try {↵

3

                printResults(rs, out);↵

3

                zipFile(rIn, zOut);↵

4

            } finally {↵

4

            } finally {↵

5

                if (rs != null) {↵

5

                ↵

6

                    rs.close();↵

7

                }↵

6

    rIn.close();↵

8

            }

7

            }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 1