File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/OneToManyPersister.java | |||
Method name: void insertRows(PersistentCollection, Serializable, SessionImplementor)
|
Method name: int doUpdateRows(Serializable, PersistentCollection, SessionImplementor)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | if ( useBatch ) {↵ | 1 | if ( useBatch ) {↵ | |
2 | if ( st == null ) {↵ | 2 | if ( st == null ) {↵ | |
3 | if ( callable ) {↵ | 3 | if ( callable ) {↵ | |
4 | st = session.getBatcher().prepareBatchCallableStatement( sql );↵ | 4 | st = session.getBatcher().prepareBatchCallableStatement( sql );↵ | |
5 | }↵ | 5 | }↵ | |
6 | else {↵ | 6 | else {↵ | |
7 | st = session.getBatcher().prepareBatchStatement( sql );↵ | 7 | st = session.getBatcher().prepareBatchStatement( sql );↵ | |
8 | }↵ | 8 | }↵ | |
9 | }↵ | 9 | }↵ | |
10 | }↵ | 10 | }↵ | |
11 | else {↵ | 11 | else {↵ | |
12 | if ( callable ) {↵ | 12 | if ( callable ) {↵ | |
13 | st = session.getBatcher().prepareCallableStatement( sql );↵ | 13 | st = session.getBatcher().prepareCallableStatement( sql );↵ | |
14 | }↵ | 14 | }↵ | |
15 | else {↵ | 15 | else {↵ | |
16 | st = session.getBatcher().prepareStatement( sql );↵ | 16 | st = session.getBatcher().prepareStatement( sql );↵ | |
17 | }↵ | 17 | }↵ | |
18 | } | 18 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 25 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 11.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
18 | if (useBatch) | 42 | if (useBatch) | |||||
19 | if (st == null) | 43 | if (st == null) | |||||
20 | if (callable) | 44 | if (callable) | |||||
21 | st = session.getBatcher().prepareBatchCallableStatement(sql); | 45 | st = session.getBatcher().prepareBatchCallableStatement(sql); | |||||
else | | |||||||
22 | st = session.getBatcher().prepareBatchStatement(sql); |
| | |||||
|
| 46 | st = session.getBatcher().prepareBatchStatement(sql); | |||||
else | else | |||||||
23 | if (callable) | 47 | if (callable) | |||||
24 | st = session.getBatcher().prepareCallableStatement(sql); | 48 | st = session.getBatcher().prepareCallableStatement(sql); | |||||
else | | |||||||
25 | st = session.getBatcher().prepareStatement(sql); |
| | |||||
|
| 49 | st = session.getBatcher().prepareStatement(sql); |
Row | Violation |
---|---|
1 | Unmatched statement st=session.getBatcher().prepareBatchStatement(sql); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement st=session.getBatcher().prepareBatchStatement(sql); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement st=session.getBatcher().prepareBatchStatement(sql); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement st=session.getBatcher().prepareBatchStatement(sql); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement st=session.getBatcher().prepareStatement(sql); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement st=session.getBatcher().prepareStatement(sql); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Unmatched statement st=session.getBatcher().prepareStatement(sql); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement st=session.getBatcher().prepareStatement(sql); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |