File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java | |||
Method name: int executeUpdate(String, QueryParameters)
|
Method name: int executeNativeUpdate(NativeSQLQuerySpecification, QueryParameters)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | errorIfClosed();↵ | 1 | errorIfClosed();↵ | |
2 | checkTransactionSynchStatus();↵ | 2 | checkTransactionSynchStatus();↵ | |
3 | queryParameters.validateParameters();↵ | 3 | queryParameters.validateParameters();↵ | |
4 | HQLQueryPlan plan = getHQLQueryPlan( query, false );↵ | 4 | NativeSQLQueryPlan plan = getNativeSQLQueryPlan(↵ | |
5 | ↵ | 5 | nativeQuerySpecification);↵ | |
6 | ↵ | |||
6 | autoFlushIfRequired( plan.getQuerySpaces() );↵ | 7 | autoFlushIfRequired( plan.get↵ | |
7 | ↵ | 8 | CustomQuery().getQuerySpaces() );↵ | |
9 | ↵ | |||
8 | boolean success = false;↵ | 10 | boolean success = false;↵ | |
9 | int result = 0;↵ | 11 | int result = 0;↵ | |
10 | try {↵ | |||
11 | ↵ | 12 | try {↵ | |
12 | result = plan.performExecuteUpdate( queryParameters, this );↵ | 13 | result = plan.performExecuteUpdate(queryParameters, this);↵ | |
13 | success = true;↵ | 14 | success = true;↵ | |
14 | }↵ | |||
15 | finally {↵ | |||
16 | ↵ | 15 | } finally {↵ | |
17 | afterOperation(success);↵ | 16 | afterOperation(success);↵ | |
18 | }↵ | |||
19 | ↵ | 17 | }↵ | |
20 | return result; | 18 | return result; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 73 |
Number of mapped statements | 9 |
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) | 26.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | errorIfClosed(); | 1 | errorIfClosed(); | ||||||||||||
2 | checkTransactionSynchStatus(); | 2 | checkTransactionSynchStatus(); | ||||||||||||
3 | queryParameters.validateParameters(); | 3 | queryParameters.validateParameters(); | ||||||||||||
| 4 | NativeSQLQueryPlan plan = getNativeSQLQueryPlan(nativeQuerySpecification); | |||||||||||||
4 | HQLQueryPlan plan = getHQLQueryPlan(query, false); | | |||||||||||||
|
| 5 | autoFlushIfRequired(plan.getCustomQuery().getQuerySpaces()); | ||||||||||||
5 | autoFlushIfRequired(plan.getQuerySpaces()); |
| | ||||||||||||
6 | boolean success = false; | 6 | boolean success = false; | ||||||||||||
7 | int result = 0; | 7 | int result = 0; | ||||||||||||
8 | try | 8 | try | ||||||||||||
9 | result = plan.performExecuteUpdate(queryParameters, this); |
| 9 | result = plan.performExecuteUpdate(queryParameters, this); | |||||||||||
10 | success = true; | 10 | success = true; | ||||||||||||
11 | return result; | 11 | return result; |
Row | Violation |
---|---|
1 | Unmatched statement autoFlushIfRequired(plan.getCustomQuery().getQuerySpaces()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement autoFlushIfRequired(plan.getQuerySpaces()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Type org.hibernate.engine.query.HQLQueryPlan of variable plan does not match with type org.hibernate.engine.query.NativeSQLQueryPlan of variable plan |