File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/CriteriaImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/AbstractQueryImpl.java | |||
Method name: void before()
|
Method name: void before()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ( flushMode != null ) {↵ | 1 | if ( flushMode!=null ) {↵ | |
2 | sessionFlushMode = getSession().getFlushMode();↵ | 2 | sessionFlushMode = getSession().getFlushMode();↵ | |
3 | getSession().setFlushMode( flushMode );↵ | 3 | getSession().setFlushMode(flushMode);↵ | |
4 | }↵ | 4 | }↵ | |
5 | if ( cacheMode != null ) {↵ | 5 | if ( cacheMode!=null ) {↵ | |
6 | sessionCacheMode = getSession().getCacheMode();↵ | 6 | sessionCacheMode = getSession().getCacheMode();↵ | |
7 | getSession().setCacheMode( cacheMode );↵ | 7 | getSession().setCacheMode(cacheMode);↵ | |
8 | } | 8 |
| |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 28 |
Number of mapped statements | 6 |
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) | 2.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | if (flushMode != null) | 1 | if (flushMode != null) | |
2 | sessionFlushMode = getSession().getFlushMode(); | 2 | sessionFlushMode = getSession().getFlushMode(); | |
3 | getSession().setFlushMode(flushMode); | 3 | getSession().setFlushMode(flushMode); | |
4 | if (cacheMode != null) | 4 | if (cacheMode != null) | |
5 | sessionCacheMode = getSession().getCacheMode(); | 5 | sessionCacheMode = getSession().getCacheMode(); | |
6 | getSession().setCacheMode(cacheMode); | 6 | getSession().setCacheMode(cacheMode); |
Row | Violation |
---|