public class PessimisticRepeatableSessionRefreshTest extends PessimisticSessionRefreshTest { private static final String CACHE_CONFIG = "pessimistic-entity-repeatable"; /** * Create a new PessimisticRepeatableSessionRefreshTest. * * @param x */ public PessimisticRepeatableSessionRefreshTest(String x) { super(x); } public static Test suite() throws Exception { TestSuite suite = new TestSuite(PessimisticRepeatableSessionRefreshTest.class); String[] acctClasses = { OUR_PACKAGE + ".Account", OUR_PACKAGE + ".AccountHolder" }; return new IsolatedCacheTestSetup(suite, acctClasses, CACHE_CONFIG); } @Override protected String getEntityCacheConfigName() { return CACHE_CONFIG;
public class OptimisticIsolatedClassLoaderTest extends PessimisticIsolatedClassLoaderTest { private static final String CACHE_CONFIG = "optimistic-shared"; /** * Create a new OptimisticIsolatedClassLoaderTest. * * @param name */ public OptimisticIsolatedClassLoaderTest(String name) { super(name); } public static Test suite() throws Exception { TestSuite suite = new TestSuite(OptimisticIsolatedClassLoaderTest.class); String[] acctClasses = { OUR_PACKAGE + ".Account", OUR_PACKAGE + ".AccountHolder" }; return new IsolatedCacheTestSetup(suite, acctClasses, CACHE_CONFIG); } protected String getEntityCacheConfigName() { return CACHE_CONFIG;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/PessimisticRepeatableSessionRefreshTest.java File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/classloader/OptimisticIsolatedClassLoaderTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class PessimisticRepeatableSessionRefreshTest extends PessimisticSessionRefreshTest
1
public class OptimisticIsolatedClassLoaderTest extends PessimisticIsolatedClassLoaderTest
2
{
2
{
3
   
4
   private static final String CACHE_CONFIG = "pessimistic-entity-repeatable";
3
   private static final String CACHE_CONFIG = "optimistic-
4
shared";
5
   
5
   /**
6
   /**
6
    * Create a new PessimisticRepeatableSessionRefreshTest.
7
    * Create a new OptimisticIsolatedClassLoaderTest.
7
    * 
8
    * 
8
    * @param x
9
    * @param name
9
    */
10
    */
10
   public PessimisticRepeatableSessionRefreshTest(String x)
11
   public OptimisticIsolatedClassLoaderTest(String name)
11
   {
12
   {
12
      super(x);
13
      super(name);      
13
   }
14
   }
14
   
15
   
15
   public static Test suite() throws Exception {
16
   public static Test suite() throws Exception {
16
       TestSuite suite = new TestSuite(PessimisticRepeatableSessionRefreshTest.class);
17
       TestSuite suite = new TestSuite(OptimisticIsolatedClassLoaderTest.class);
17
       String[] acctClasses = { OUR_PACKAGE + ".Account", OUR_PACKAGE + ".AccountHolder" };
18
       String[] acctClasses = { OUR_PACKAGE + ".Account", OUR_PACKAGE + ".AccountHolder" };
18
       return new IsolatedCacheTestSetup(suite, acctClasses, CACHE_CONFIG);
19
       return new IsolatedCacheTestSetup(suite, acctClasses, CACHE_CONFIG);
19
   }
20
   }
20
   @Override
21
   protected String getEntityCacheConfigName() {
21
   protected String getEntityCacheConfigName() {
22
       return CACHE_CONFIG;
22
       return CACHE_CONFIG;
23
   
23
   
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