try { cache.destroy(); } catch ( Exception e ) { log.warn( "could not destroy cache", e ); }
try { region.destroy(); } catch (Exception e) { log.warn("could not destroy UpdateTimestamps cache", e); }
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/NonstrictReadWriteCache.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/UpdateTimestampsCache.java
Method name: void destroy() Method name: void destroy()
Number of AST nodes: 2 Number of AST nodes: 2
1
try {
1
try {
2
			cache.destroy();
2
			region.destroy();
3
		}
3
		}
4
		catch ( Exception e ) {
4
		catch (Exception e) {
5
			log.warn( "could not destroy cache", e );
5
			log.warn("could not destroy UpdateTimestamps cache", e);
6
		}
6
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    "could not destroy cache""could not destroy UpdateTimestamps cache"LITERAL_VALUE_MISMATCH
    1
    try
    2
    cache.destroy();
    2
    cache.destroy();
    2
    region.destroy();
    Differences
    Expression1Expression2Difference
    cacheregionVARIABLE_NAME_MISMATCH
    org.hibernate.cache.Cacheorg.hibernate.cache.TimestampsRegionVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.cache.Cache of variable cache does not match with type org.hibernate.cache.TimestampsRegion of variable region
    • Make classes org.hibernate.cache.Cache and org.hibernate.cache.TimestampsRegion extend a common superclass
    2
    region.destroy();
    Precondition Violations (1)
    Row Violation
    1Type org.hibernate.cache.Cache of variable cache does not match with type org.hibernate.cache.TimestampsRegion of variable region