File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/classic/PathExpressionParser.java | |||
Method name: Type getTypeUsingProjection(Criteria, String)
|
Method name: String getWhereColumn()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ( projectionTypes.length != 1 ) {↵ | 1 | if ( columns.length != 1 ) {↵ | |
2 | //should never happen, i think↵ | 2 | ↵ | |
3 | throw new QueryException( "not a single-length projection: " + propertyName );↵ | 3 | throw new QueryException( "path expression ends in a composite value: " + path );↵ | |
4 | }↵ | 4 | }↵ | |
5 | return projectionTypes[0]; | 5 | return columns[0]; | |
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 in different classes |
Number of node comparisons | 5 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | if (projectionTypes.length != 1) |
| 1 | if (columns.length != 1) | ||||||||||||||
|
| 2 | throw new QueryException("path expression ends in a composite value: " + path); | |||||||||||||||
7 | throw new QueryException("not a single-length projection: " + propertyName); |
| | |||||||||||||||
|
| 3 | return columns[0]; | |||||||||||||||
8 | return projectionTypes[0]; |
| |
Row | Violation |
---|---|
1 | Type org.hibernate.type.Type[] of variable projectionTypes does not match with type java.lang.String[] of variable columns |
2 | Unmatched throw new QueryException("path expression ends in a composite value: " + path); |
3 | Unmatched throw new QueryException("not a single-length projection: " + propertyName); |
4 | Unmatched return columns[0]; |
5 | Unmatched return projectionTypes[0]; |