if ( AccessType.READ_ONLY.equals( accessType ) ) { if ( metadata.isMutable() ) { log.warn( "read-only cache configured for mutable collection [" + getName() + "]" ); } ccs = new ReadOnlyCache(); } else if ( AccessType.READ_WRITE.equals( accessType ) ) { ccs = new ReadWriteCache(); } else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) { ccs = new NonstrictReadWriteCache(); } else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) { ccs = new TransactionalCache(); } else { throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
if ( AccessType.READ_ONLY.equals( accessType ) ) { if ( metadata.isMutable() ) { log.warn( "read-only cache configured for mutable entity [" + getName() + "]" ); } ccs = new ReadOnlyCache(); } else if ( AccessType.READ_WRITE.equals( accessType ) ) { ccs = new ReadWriteCache(); } else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) { ccs = new NonstrictReadWriteCache(); } else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) { ccs = new TransactionalCache(); } else { throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/impl/bridge/CollectionRegionAdapter.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cache/impl/bridge/EntityRegionAdapter.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if ( AccessType.READ_ONLY.equals( accessType ) ) {
1
if ( AccessType.READ_ONLY.equals( accessType ) ) {
2
			if ( metadata.isMutable() ) {
2
			if ( metadata.isMutable() ) {
3
				log.warn( "read-only cache configured for mutable collection [" + getName() + "]" );
3
				log.warn( "read-only cache configured for mutable entity [" + getName() + "]" );
4
			}
4
			}
5
			ccs = new ReadOnlyCache();
5
			ccs = new ReadOnlyCache();
6
		}
6
		}
7
		else if ( AccessType.READ_WRITE.equals( accessType ) ) {
7
		else if ( AccessType.READ_WRITE.equals( accessType ) ) {
8
			ccs = new ReadWriteCache();
8
			ccs = new ReadWriteCache();
9
		}
9
		}
10
		else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) {
10
		else if ( AccessType.NONSTRICT_READ_WRITE.equals( accessType ) ) {
11
			ccs = new NonstrictReadWriteCache();
11
			ccs = new NonstrictReadWriteCache();
12
		}
12
		}
13
		else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) {
13
		else if ( AccessType.TRANSACTIONAL.equals( accessType ) ) {
14
			ccs = new TransactionalCache();
14
			ccs = new TransactionalCache();
15
		}
15
		}
16
		else {
16
		else {
17
			throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
17
			throw new IllegalArgumentException( "unrecognized access strategy type [" + accessType + "]" );
18
		
18
		
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0