region.ensureRegionRootExists();
Option opt = getDataVersionOption(version, version);
return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
region.ensureRegionRootExists();
// We ignore minimalPutOverride. JBossCache putForExternalRead is
// already about as minimal as we can get; it will promptly return
// if it discovers that the node we want to write to already exists
Option opt = getDataVersionOption(version, version);
return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/access/OptimisticTransactionalAccessDelegate.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/access/OptimisticTransactionalAccessDelegate.java
|
Method name: boolean putFromLoad(Object, Object, long, Object)
|
|
Method name: boolean putFromLoad(Object, Object, long, Object, boolean)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | region.ensureRegionRootExists();↵ | | 1 | region.ensureRegionRootExists();↵
|
|
| | | 2 | // We ignore minimalPutOverride. JBossCache putForExternalRead is↵
|
| | | 3 | // already about as minimal as we can get; it will promptly return↵
|
| | | 4 | // if it discovers that the node we want to write to already exists↵
|
2 | Option opt = getDataVersionOption(version, version);↵ | | 5 | Option opt = getDataVersionOption(version, version);↵
|
3 | return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt); | | 6 | return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
|
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | region.ensureRegionRootExists(); | | 1 | region.ensureRegionRootExists(); |
2 | Option opt = getDataVersionOption(version, version); | | 2 | Option opt = getDataVersionOption(version, version); |
3 | return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt); | | 3 | return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt); |
Precondition Violations (0)
Row |
Violation |