public class EhCacheTest extends BaseCacheProviderTestCase { public EhCacheTest(String x) { super( x ); } public static Test suite() { return new FunctionalTestClassTestSuite( EhCacheTest.class ); } public String getCacheConcurrencyStrategy() { return "read-write"; } protected Class getCacheProvider() { return EhCacheProvider.class; } protected String getConfigResourceKey() { return Environment.CACHE_PROVIDER_CONFIG; } protected String getConfigResourceLocation() { return "ehcache.xml"; } protected boolean useTransactionManager() { return false;
public class PessimisticTreeCacheTest extends BaseCacheProviderTestCase { public PessimisticTreeCacheTest(String x) { super( x ); } public static Test suite() { return new FunctionalTestClassTestSuite( PessimisticTreeCacheTest.class ); } public String getCacheConcurrencyStrategy() { return "transactional"; } protected Class getCacheProvider() { return TreeCacheProvider.class; } protected String getConfigResourceKey() { return Environment.CACHE_PROVIDER_CONFIG; } protected String getConfigResourceLocation() { return "treecache-pessimistic.xml"; } protected boolean useTransactionManager() { return true;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-ehcache/src/test/java/org/hibernate/cache/EhCacheTest.java File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/test/java/org/hibernate/cache/PessimisticTreeCacheTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class EhCacheTest extends BaseCacheProviderTestCase {
1
public class PessimisticTreeCacheTest extends BaseCacheProviderTestCase {
2
	public EhCacheTest(String x) {
2
	public PessimisticTreeCacheTest(String x) {
3
		super( x );
3
		super( x );
4
	}
4
	}
5

6
	public static Test suite() {
5
	public static Test suite() {
7
		return new FunctionalTestClassTestSuite( EhCacheTest.class );
6
		return new FunctionalTestClassTestSuite( PessimisticTreeCacheTest.class );
8
	}
7
	}
9

10
	public String getCacheConcurrencyStrategy() {
8
	public String getCacheConcurrencyStrategy() {
11
		return "read-write";
9
		return "transactional";
12
	}
10
	}
13

14
	protected Class getCacheProvider() {
11
	protected Class getCacheProvider() {
15
		return EhCacheProvider.class;
12
		return TreeCacheProvider.class;
16
	}
13
	}
17

18
	protected String getConfigResourceKey() {
14
	protected String getConfigResourceKey() {
19
		return Environment.CACHE_PROVIDER_CONFIG;
15
		return Environment.CACHE_PROVIDER_CONFIG;
20
	}
16
	}
21

22
	protected String getConfigResourceLocation() {
17
	protected String getConfigResourceLocation() {
23
		return "ehcache.xml";
18
		return "treecache-pessimistic.xml";
24
	}
19
	}
25

26
	protected boolean useTransactionManager() {
20
	protected boolean useTransactionManager() {
27
		return false;
21
		return true;
28
	
22
	
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