File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/HolderInstantiator.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/ExecuteUpdateResultCheckStyle.java | |||
Method name: Object instantiate(Object[])
|
Method name: ExecuteUpdateResultCheckStyle determineDefault(String, boolean)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if(transformer==null) {↵ | 1 | if ( customSql == null ) { ↵ | |
2 | return row;↵ | 2 | return ↵ | |
3 | } ↵ | 3 | COUNT;↵ | |
4 | }↵ | |||
4 | else {↵ | 5 | else { ↵ | |
5 | return transformer.transformTuple(row, queryReturnAliases);↵ | 6 | return callable ? PARAM : COUNT; ↵ | |
6 | } | 7 |
| |
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 in different classes |
Number of node comparisons | 9 |
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) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (transformer == null) |
| 1 | if (customSql == null) | ||||||||||||||
|
| 2 | return COUNT; | |||||||||||||||
2 | return row; |
| | |||||||||||||||
else | | |||||||||||||||||
|
| 3 | return callable ? PARAM : COUNT; | |||||||||||||||
3 | return transformer.transformTuple(row, queryReturnAliases); |
| |
Row | Violation |
---|---|
1 | Type org.hibernate.transform.ResultTransformer of variable transformer does not match with type java.lang.String of variable customSql |
2 | Unmatched return COUNT; |
3 | Unmatched return row; |
4 | Unmatched return callable ? PARAM : COUNT; |
5 | Unmatched return transformer.transformTuple(row,queryReturnAliases); |