File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/StandardQueryCache.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/StandardQueryCache.java | |||
Method name: boolean put(QueryKey, Type[], List, boolean, SessionImplementor)
|
Method name: List get(QueryKey, Type[], boolean, Set, SessionImplementor)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( returnTypes.length == 1 ) {↵ | 1 | if ( returnTypes.length == 1 ) {↵ | |
2 | cacheable.add( returnTypes[0].disassemble( result.get( i ), session, null ) );↵ | 2 | result.add( returnTypes[0].assemble( ( Serializable ) cacheable.get( i ), session, null ) );↵ | |
3 | }↵ | 3 | }↵ | |
4 | else {↵ | 4 | else {↵ | |
5 | cacheable.add(↵ | 5 | result.add(↵ | |
6 | TypeFactory.disassemble(↵ | 6 | TypeFactory.assemble(↵ | |
7 | ( Object[] ) result.get( i ), returnTypes, null, session, null↵ | 7 | ( Serializable[] ) cacheable.get( i ), returnTypes, session, null↵ | |
8 | )↵ | 8 | )↵ | |
9 | );↵ | 9 | );↵ | |
10 | } | 10 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 1 |
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) | 1.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
9 | if (returnTypes.length == 1) | 19 | if (returnTypes.length == 1) | ||||
10 | cacheable.add(returnTypes[0].disassemble(result.get(i), session, null)); |
| | ||||
else | | ||||||
11 | cacheable.add(TypeFactory.disassemble((Object[])result.get(i), returnTypes, null, session, null)); |
| | ||||
|
| 21 | result.add(TypeFactory.assemble((Serializable[])cacheable.get(i), returnTypes, session, null)); | ||||
|
| 20 | result.add(returnTypes[0].assemble((Serializable)cacheable.get(i), session, null)); |
Row | Violation |
---|---|
1 | Unmatched statement cacheable.add(returnTypes[0].disassemble(result.get(i),session,null)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement cacheable.add(TypeFactory.disassemble((Object[])result.get(i),returnTypes,null,session,null)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement result.add(TypeFactory.assemble((Serializable[])cacheable.get(i),returnTypes,session,null)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement result.add(returnTypes[0].assemble((Serializable)cacheable.get(i),session,null)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |