Object elt = /*(array==null) ? tempList.get(i) :*/ Array.get(array, i);
try {
Array.set( result, i, persister.getElementType().deepCopy(elt, entityMode, persister.getFactory()) );
}
catch (IllegalArgumentException iae) {
log.error("Array element type error", iae);
throw new HibernateException( "Array element type error", iae );
}
try {
// prepare and execute the insert
PreparedStatement insert = prepare( insertSQL, session );
try {
binder.bindValues( insert );
return executeAndExtract( insert );
}
finally {
releaseStatement( insert, session );
}
}
catch ( SQLException sqle ) {
throw JDBCExceptionHelper.convert(
session.getFactory().getSQLExceptionConverter(),
sqle,
"could not insert: " + MessageHelper.infoString( persister ),
insertSQL
);
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/id/insert/AbstractReturningDelegate.java
|
Method name: Serializable getSnapshot(CollectionPersister)
|
|
Method name: Serializable performInsert(String, SessionImplementor, Binder)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 5
|
|
1 | Object elt = /*(array==null) ? tempList.get(i) :*/ Array.get(array, i↵ | | 1 | try {↵
|
| | | 2 | // prepare and execute the insert↵
|
2 | );↵ | | 3 | PreparedStatement insert = prepare( insertSQL, session );
↵
|
3 | try {↵ | | 4 | try {
↵
|
4 | Array.set( result, i, persister.getElementType().deepCopy(elt, entityMode, persister.getFactory())↵ | | 5 | binder.bindValues( insert );↵
|
| | | 6 | return executeAndExtract( insert );↵
|
| | | 7 | }↵
|
| | | 8 | finally {↵
|
5 | );↵ | | 9 | releaseStatement( insert, session );
↵
|
6 | }↵ | | 10 | }
↵
|
7 | ↵ | | 11 | }↵
|
8 | catch (IllegalArgumentException iae) {↵ | | 12 | catch ( SQLException sqle ) {
↵
|
9 | log.error("Array element type error", iae);↵ | | 13 | ↵
|
10 | throw new HibernateException( "Array element type error", iae );↵ | | |
|
11 | ↵ | | 14 | throw JDBCExceptionHelper.convert(↵
|
| | | 15 | session.getFactory().getSQLExceptionConverter(),↵
|
| | | 16 | sqle,↵
|
| | | 17 | "could not insert: " + MessageHelper.infoString( persister ),↵
|
| | | 18 | insertSQL↵
|
| | | 19 | );↵
|
12 | } | | 20 | }
|
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 |
Number of node comparisons | 1 |