File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java | File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/hql/HQLTest.java | |||
Method name: void testSQLFunctions()
|
Method name: void testExpressionWithParamInFunction()
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if ( !(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof SybaseDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof InterbaseDialect) && !(getDialect() instanceof TimesTenDialect) ) { //My SQL has a funny concatenation operator↵ | 1 | if ( !( getDialect() instanceof MySQLDialect ) && ! ( getDialect() instanceof SybaseDialect ) && ! ( getDialect() instanceof Sybase11Dialect ) && !( getDialect() instanceof SybaseASE15Dialect ) && ! ( getDialect() instanceof SybaseAnywhereDialect ) ↵ | |
2 | assertTrue(↵ | |||
3 | s.find↵ | 2 | && ! ( getDialect() instanceof SQLServerDialect ) ) {↵ | |
4 | ("from Simple s where lower( s.name || ' foo' ) ='simple 1 foo'").size()==1↵ | 3 | assertTranslation("from Animal where lower(upper('foo') ↵ | |
5 | ); ↵ | 4 | || upper(:bar)) like 'f%'");↵ | |
6 | } | 5 |
| |
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | if (!(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof SybaseDialect) && !(getDialect() instanceof MckoiDialect) && !(getDialect() instanceof InterbaseDialect) && !(getDialect() instanceof TimesTenDialect)) |
| 7 | if (!(getDialect() instanceof MySQLDialect) && !(getDialect() instanceof SybaseDialect) && !(getDialect() instanceof Sybase11Dialect) && !(getDialect() instanceof SybaseASE15Dialect) && !(getDialect() instanceof SybaseAnywhereDialect) && !(getDialect() instanceof SQLServerDialect)) | ||||||||||
| 8 | assertTranslation("from Animal where lower(upper('foo') || upper(:bar)) like 'f%'"); | ||||||||||||
14 | assertTrue(s.find("from Simple s where lower( s.name || ' foo' ) ='simple 1 foo'").size() == 1); | |
Row | Violation |
---|