File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/StatelessSessionImpl.java | |||
Method name: List listCustomQuery(CustomQuery, QueryParameters)
|
Method name: int executeNativeUpdate(NativeSQLQuerySpecification, QueryParameters)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 10 | |||
1 | errorIfClosed();↵ | 1 | errorIfClosed();↵ | |
2 | CustomLoader loader = new CustomLoader( customQuery, getFactory() ↵ | 2 | queryParameters.validateParameters();↵ | |
3 | );↵ | 3 | NativeSQLQueryPlan plan = getNativeSQLQueryPlan(nativeSQLQuerySpecification);↵ | |
4 | boolean success = false;↵ | 4 | boolean success = false;↵ | |
5 | List results;↵ | 5 | int result = 0;↵ | |
6 | try {↵ | 6 | try {↵ | |
7 | results = loader.list(this, queryParameters);↵ | 7 | result = plan.performExecuteUpdate(queryParameters, this);↵ | |
8 | success = true;↵ | 8 | success = true;↵ | |
9 | }↵ | 9 | }↵ | |
10 | finally {↵ | 10 | finally {↵ | |
11 | afterOperation(success);↵ | 11 | afterOperation(success);↵ | |
12 | }↵ | 12 | }↵ | |
13 | temporaryPersistenceContext.clear();↵ | 13 | temporaryPersistenceContext.clear();↵ | |
14 | return results; | 14 | 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 | 51 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 5 |
Time elapsed for statement mapping (ms) | 21.7 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
1 | errorIfClosed(); | 1 | errorIfClosed(); | |||||
| 2 | queryParameters.validateParameters(); | ||||||
2 | CustomLoader loader = new CustomLoader(customQuery, getFactory()); |
| | |||||
| 3 | NativeSQLQueryPlan plan = getNativeSQLQueryPlan(nativeSQLQuerySpecification); | ||||||
3 | boolean success = false; | 4 | boolean success = false; | |||||
4 | List results; | | ||||||
| 5 | int result = 0; | ||||||
5 | try | 6 | try | |||||
6 | results = loader.list(this, queryParameters); |
| | |||||
|
| 7 | result = plan.performExecuteUpdate(queryParameters, this); | |||||
7 | success = true; | 8 | success = true; | |||||
8 | temporaryPersistenceContext.clear(); | 9 | temporaryPersistenceContext.clear(); | |||||
9 | return results; |
| | |||||
|
| 10 | return result; |
Row | Violation |
---|---|
1 | Unmatched statement CustomLoader loader=new CustomLoader(customQuery,getFactory()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement results=loader.list(this,queryParameters); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement results=loader.list(this,queryParameters); 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 |
4 | Unmatched statement result=plan.performExecuteUpdate(queryParameters,this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement result=plan.performExecuteUpdate(queryParameters,this); 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 |
6 | Unmatched return results; |
7 | Unmatched return result; |