File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/criteria/CriteriaQueryTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/criteria/CriteriaQueryTest.java | |||
Method name: void testProjectionCache()
|
Method name: void testProjectionCache()
|
|||
Number of AST nodes: 1 | Number of AST nodes: 1 | |||
1 | s.createCriteria(Enrolment.class)↵ | 1 | s.createCriteria(Enrolment.class)↵ | |
2 | .createAlias("student", "s")↵ | 2 | .createAlias("student", "s")↵ | |
3 | .createAlias("course", "c")↵ | 3 | .createAlias("course", "c")↵ | |
4 | .add( Restrictions.isNotEmpty("s.enrolments") )↵ | 4 | .add( Restrictions.isNotEmpty("s.enrolments") )↵ | |
5 | .setProjection( Projections.projectionList()↵ | 5 | .setProjection( Projections.projectionList()↵ | |
6 | .add( Projections.property("s.name") )↵ | 6 | .add( Projections.property("s.name") )↵ | |
7 | .add( Projections.property("c.description") )↵ | 7 | .add( Projections.property("c.description") )↵ | |
8 | )↵ | 8 | )↵ | |
9 | .setCacheable(true)↵ | 9 | .setCacheable(true)↵ | |
10 | .list(); | 10 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 1 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
41 | s.createCriteria(Enrolment.class).createAlias("student", "s").createAlias("course", "c").add(Restrictions.isNotEmpty("s.enrolments")).setProjection(Projections.projectionList().add(Projections.property("s.name")).add(Projections.property("c.description"))).setCacheable(true).list(); | 49 | s.createCriteria(Enrolment.class).createAlias("student", "s").createAlias("course", "c").add(Restrictions.isNotEmpty("s.enrolments")).setProjection(Projections.projectionList().add(Projections.property("s.name")).add(Projections.property("c.description"))).setCacheable(true).list(); |
Row | Violation |
---|