try {
if ( statement != null ) {
statement.close();
}
if ( connection != null ) {
connectionHelper.release();
}
}
catch ( Exception e ) {
exceptions.add( e );
log.error( "Could not close connection", e );
}
try {
if ( outputFileWriter != null ) {
outputFileWriter.close();
}
if ( importFileReader != null ) {
importFileReader.close();
}
}
catch ( IOException ioe ) {
exceptions.add( ioe );
log.error( "Error closing output file: " + outputFile, ioe );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
|
Method name: void execute(boolean, boolean, boolean, boolean)
|
|
Method name: void execute(boolean, boolean, boolean, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | try {↵ | | 1 | try {↵
|
2 | if ( statement != null ) {↵ | | 2 | if ( outputFileWriter != null ) {↵
|
3 | statement.close();↵ | | 3 | outputFileWriter.close();↵
|
4 | }↵ | | 4 | }↵
|
5 | if ( connection != null ) {↵ | | 5 | if ( importFileReader != null ) {↵
|
6 | connectionHelper.release();↵ | | 6 | importFileReader.close();↵
|
7 | }↵ | | 7 | }↵
|
8 | }↵ | | 8 | }↵
|
9 | catch ( Exception e ) {↵ | | 9 | catch ( IOException ioe ) {↵
|
10 | exceptions.add( e );↵ | | 10 | exceptions.add( ioe );↵
|
11 | log.error( "Could not close connection", e );↵ | | 11 | log.error( "Error closing output file: " + outputFile, ioe );↵
|
12 | } | | 12 | }
|
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 the same method |
Number of node comparisons | 0 |