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);
region.ensureRegionRootExists(); 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, boolean) Method name: boolean putFromLoad(Object, Object, long, Object)
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
5
        Option opt = getDataVersionOption(version, version);
2
        Option opt = getDataVersionOption(version, version);
6
        return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
3
        return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons9
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 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