errorIfClosed();
checkTransactionSynchStatus();
if ( log.isTraceEnabled() ) {
log.trace("setting cache mode to: " + cacheMode);
}
this.cacheMode= cacheMode;
errorIfClosed();
checkTransactionSynchStatus();
if ( log.isTraceEnabled() ) {
log.trace("setting flush mode to: " + flushMode);
}
this.flushMode = flushMode;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionImpl.java
|
Method name: void setCacheMode(CacheMode)
|
|
Method name: void setFlushMode(FlushMode)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | errorIfClosed();↵ | | 1 | errorIfClosed();↵
|
2 | checkTransactionSynchStatus();↵ | | 2 | checkTransactionSynchStatus();↵
|
3 | if ( log.isTraceEnabled() ) {↵ | | 3 | if ( log.isTraceEnabled() ) {↵
|
4 | log.trace("setting cache mode to: " + cacheMode);↵ | | 4 | log.trace("setting flush mode to: " + flushMode);↵
|
5 | }↵ | | 5 | }↵
|
6 | this.cacheMode= cacheMode; | | 6 | this.flushMode = flushMode;
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | errorIfClosed(); | | 1 | errorIfClosed(); |
2 | checkTransactionSynchStatus(); | | 2 | checkTransactionSynchStatus(); |
3 | if (log.isTraceEnabled()) | | 3 | if (log.isTraceEnabled()) |
| | | 4 | log.trace("setting flush mode to: " + flushMode); |
4 | log.trace("setting cache mode to: " + cacheMode); | | | |
| | | 5 | this.flushMode = flushMode; |
5 | this.cacheMode = cacheMode; | | | |
Precondition Violations (0)
Row |
Violation |