Person p = new Person(); p.setIdentity( new Identity() ); Account a = new Account(); a.setNumber("123-12345-1236"); a.setOwner(p); p.getIdentity().setName("Gavin"); p.getIdentity().setSsn("123-12-1234"); Session s = openSession(); Transaction tx = s.beginTransaction(); s.persist(p); s.persist(a); s.flush(); s.clear(); a = (Account) s.createQuery("from Account a left join fetch a.owner").uniqueResult(); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); s.clear(); a = (Account) s.get(Account.class, "123-12345-1236"); assertFalse( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); s.clear(); getSessions().evict(Account.class); getSessions().evict(Person.class); a = (Account) s.get(Account.class, "123-12345-1236"); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); s.delete( a ); s.delete( a.getOwner() ); tx.commit(); s.close();
Person p = new Person(); p.setIdentity( new Identity() ); Account a = new Account(); a.setNumber("123-12345-1236"); a.setOwner(p); p.getIdentity().setName("Gavin"); p.getIdentity().setSsn("123-12-1234"); Session s = openSession(); Transaction tx = s.beginTransaction(); s.persist(p); s.persist(a); s.flush(); s.clear(); a = (Account) s.createQuery("from Account a left join fetch a.owner").uniqueResult(); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); s.clear(); a = (Account) s.get(Account.class, "123-12345-1236"); assertFalse( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); s.clear(); getSessions().evict(Account.class); getSessions().evict(Person.class); a = (Account) s.get(Account.class, "123-12345-1236"); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); assertNotNull( a.getOwner() ); assertEquals( "Gavin", a.getOwner().getIdentity().getName() ); assertTrue( Hibernate.isInitialized( a.getOwner() ) ); s.delete( a ); s.delete( a.getOwner() ); tx.commit(); s.close();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/propertyref/component/complete/CompleteComponentPropertyRefTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/propertyref/component/partial/PartialComponentPropertyRefTest.java
Method name: void testComponentPropertyRef() Method name: void testComponentPropertyRef()
Number of AST nodes: 35 Number of AST nodes: 35
1
Person p = new Person();
1
Person p = new Person();
2
		p.setIdentity( new Identity() );
2
		p.setIdentity( new Identity() );
3
		Account a = new Account();
3
		Account a = new Account();
4
		a.setNumber("123-12345-1236");
4
		a.setNumber("123-12345-1236");
5
		a.setOwner(p);
5
		a.setOwner(p);
6
		p.getIdentity().setName("Gavin");
6
		p.getIdentity().setName("Gavin");
7
		p.getIdentity().setSsn("123-12-1234");
7
		p.getIdentity().setSsn("123-12-1234");
8
		Session s = openSession();
8
		Session s = openSession();
9
		Transaction tx = s.beginTransaction();
9
		Transaction tx = s.beginTransaction();
10
		s.persist(p);
10
		s.persist(p);
11
		s.persist(a);
11
		s.persist(a);
12
		s.flush();
12
		s.flush();
13
		s.clear();
13
		s.clear();
14
		
14
		a = (Account) s.createQuery("from Account a left join fetch a.owner").uniqueResult();
15
		a = (Account) s.createQuery("from Account a left join fetch a.owner").uniqueResult();
15
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
16
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
16
		assertNotNull( a.getOwner() );
17
		assertNotNull( a.getOwner() );
17
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
18
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
18
		s.clear();
19
		s.clear();
20
		
19
		a = (Account) s.get(Account.class, "123-12345-1236");
21
		a = (Account) s.get(Account.class, "123-12345-1236");
20
		assertFalse( Hibernate.isInitialized( a.getOwner() ) );
22
		assertFalse( Hibernate.isInitialized( a.getOwner() ) );
21
		assertNotNull( a.getOwner() );
23
		assertNotNull( a.getOwner() );
22
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
24
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
23
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
25
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
26
		
24
		s.clear();
27
		s.clear();
28
		
25
		getSessions().evict(Account.class);
29
		getSessions().evict(Account.class);
26
		getSessions().evict(Person.class);
30
		getSessions().evict(Person.class);
31
		
27
		a = (Account) s.get(Account.class, "123-12345-1236");
32
		a = (Account) s.get(Account.class, "123-12345-1236");
28
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
33
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
29
		assertNotNull( a.getOwner() );
34
		assertNotNull( a.getOwner() );
30
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
35
		assertEquals( "Gavin", a.getOwner().getIdentity().getName() );
31
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
36
		assertTrue( Hibernate.isInitialized( a.getOwner() ) );
37
		
32
		s.delete( a );
38
		s.delete( a );
33
		s.delete( a.getOwner() );
39
		s.delete( a.getOwner() );
34
		tx.commit();
40
		tx.commit();
35
		s.close();
41
		s.close();
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons357
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements30
    Number of unmapped statements in the first code fragment5
    Number of unmapped statements in the second code fragment5
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                      
    1
    Person p = new Person();
    1
    Person p = new Person();
                                                      
    2
    p.setIdentity(new Identity());
    2
    p.setIdentity(new Identity());
    2
    p.setIdentity(new Identity());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Identity does not match with type org.hibernate.test.propertyref.component.partial.Identity
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    2
    p.setIdentity(new Identity());
                                                          
    3
    Account a = new Account();
    3
    Account a = new Account();
                                                          
    4
    a.setNumber("123-12345-1236");
    4
    a.setNumber("123-12345-1236");
    4
    a.setNumber("123-12345-1236");
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    4
    a.setNumber("123-12345-1236");
    5
    a.setOwner(p);
    5
    a.setOwner(p);
    5
    a.setOwner(p);
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    5
    a.setOwner(p);
    6
    p.getIdentity().setName("Gavin");
    6
    p.getIdentity().setName("Gavin");
    6
    p.getIdentity().setName("Gavin");
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Identity of variable p.getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable p.getIdentity()
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    6
    p.getIdentity().setName("Gavin");
    7
    p.getIdentity().setSsn("123-12-1234");
    7
    p.getIdentity().setSsn("123-12-1234");
    7
    p.getIdentity().setSsn("123-12-1234");
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Identity of variable p.getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable p.getIdentity()
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    7
    p.getIdentity().setSsn("123-12-1234");
    8
    Session s = openSession();
    8
    Session s = openSession();
    9
    Transaction tx = s.beginTransaction();
    9
    Transaction tx = s.beginTransaction();
    10
    s.persist(p);
    10
    s.persist(p);
    10
    s.persist(p);
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    10
    s.persist(p);
    11
    s.persist(a);
    11
    s.persist(a);
    11
    s.persist(a);
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    11
    s.persist(a);
    12
    s.flush();
    12
    s.flush();
    13
    s.clear();
    13
    s.clear();
                                                                                                                                                                                
    14
    a = (Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult();
    Preondition Violations
    Unmatched statement a=(Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    14
    a = (Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult();
    14
    a = (Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult();
    14
    a = (Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult();
    Preondition Violations
    Unmatched statement a=(Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                
    15
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    15
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    15
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    15
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    16
    assertNotNull(a.getOwner());
    16
    assertNotNull(a.getOwner());
    16
    assertNotNull(a.getOwner());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    16
    assertNotNull(a.getOwner());
    17
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    17
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    17
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    17
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    18
    s.clear();
    18
    s.clear();
                                                                                                              
    19
    a = (Account)s.get(Account.class, "123-12345-1236");
    Preondition Violations
    Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    19
    a = (Account)s.get(Account.class, "123-12345-1236");
    19
    a = (Account)s.get(Account.class, "123-12345-1236");
    19
    a = (Account)s.get(Account.class, "123-12345-1236");
    Preondition Violations
    Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                              
    20
    assertFalse(Hibernate.isInitialized(a.getOwner()));
    20
    assertFalse(Hibernate.isInitialized(a.getOwner()));
    20
    assertFalse(Hibernate.isInitialized(a.getOwner()));
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    20
    assertFalse(Hibernate.isInitialized(a.getOwner()));
    21
    assertNotNull(a.getOwner());
    21
    assertNotNull(a.getOwner());
    21
    assertNotNull(a.getOwner());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    21
    assertNotNull(a.getOwner());
    22
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    22
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    22
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    22
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    23
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    23
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    23
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    23
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    24
    s.clear();
    24
    s.clear();
    25
    getSessions().evict(Account.class);
    25
    getSessions().evict(Account.class);
    25
    getSessions().evict(Account.class);
    Differences
    Expression1Expression2Difference
    Account.classAccount.classLITERAL_VALUE_MISMATCH
    25
    getSessions().evict(Account.class);
    26
    getSessions().evict(Person.class);
    26
    getSessions().evict(Person.class);
    26
    getSessions().evict(Person.class);
    Differences
    Expression1Expression2Difference
    Person.classPerson.classLITERAL_VALUE_MISMATCH
    26
    getSessions().evict(Person.class);
                                                                                                              
    27
    a = (Account)s.get(Account.class, "123-12345-1236");
    Preondition Violations
    Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    27
    a = (Account)s.get(Account.class, "123-12345-1236");
    27
    a = (Account)s.get(Account.class, "123-12345-1236");
    27
    a = (Account)s.get(Account.class, "123-12345-1236");
    Preondition Violations
    Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                              
    28
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    28
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    28
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    28
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    29
    assertNotNull(a.getOwner());
    29
    assertNotNull(a.getOwner());
    29
    assertNotNull(a.getOwner());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    29
    assertNotNull(a.getOwner());
    30
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    30
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    30
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Identityorg.hibernate.test.propertyref.component.partial.IdentityVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    • Make classes org.hibernate.test.propertyref.component.complete.Identity and org.hibernate.test.propertyref.component.partial.Identity extend a common superclass
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    30
    assertEquals("Gavin", a.getOwner().getIdentity().getName());
    31
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    31
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    31
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    31
    assertTrue(Hibernate.isInitialized(a.getOwner()));
    32
    s.delete(a);
    32
    s.delete(a);
    32
    s.delete(a);
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    32
    s.delete(a);
    33
    s.delete(a.getOwner());
    33
    s.delete(a.getOwner());
    33
    s.delete(a.getOwner());
    Differences
    Expression1Expression2Difference
    org.hibernate.test.propertyref.component.complete.Personorg.hibernate.test.propertyref.component.partial.PersonVARIABLE_TYPE_MISMATCH
    org.hibernate.test.propertyref.component.complete.Accountorg.hibernate.test.propertyref.component.partial.AccountVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    • Make classes org.hibernate.test.propertyref.component.complete.Person and org.hibernate.test.propertyref.component.partial.Person extend a common superclass
    Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    • Make classes org.hibernate.test.propertyref.component.complete.Account and org.hibernate.test.propertyref.component.partial.Account extend a common superclass
    33
    s.delete(a.getOwner());
    34
    tx.commit();
    34
    tx.commit();
    35
    s.close();
    35
    s.close();
    Precondition Violations (79)
    Row Violation
    1Type org.hibernate.test.propertyref.component.complete.Identity does not match with type org.hibernate.test.propertyref.component.partial.Identity
    2Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    3Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    4Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    5Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    6Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type org.hibernate.test.propertyref.component.complete.Identity of variable p.getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable p.getIdentity()
    9Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    10Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression p.getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Type org.hibernate.test.propertyref.component.complete.Identity of variable p.getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable p.getIdentity()
    13Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    14Type org.hibernate.test.propertyref.component.complete.Person of variable p does not match with type org.hibernate.test.propertyref.component.partial.Person of variable p
    15Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    16Unmatched statement a=(Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    17Unmatched statement a=(Account)s.createQuery("from Account a left join fetch a.owner").uniqueResult(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    18Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    21Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    22Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    25Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    26Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    29Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    30Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    32Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    33Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    34Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    35Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    36Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    37Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    38Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    39Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    40Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    41Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    42Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    43Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    44Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    45Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    46Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    47Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    48Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    49Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    50Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    51Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    52Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    53Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    54Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    55Unmatched statement a=(Account)s.get(Account.class,"123-12345-1236"); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    56Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    57Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    58Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    59Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    60Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    61Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    62Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    63Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    64Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    65Expression a.getOwner().getIdentity() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    66Type org.hibernate.test.propertyref.component.complete.Identity of variable a.getOwner().getIdentity() does not match with type org.hibernate.test.propertyref.component.partial.Identity of variable a.getOwner().getIdentity()
    67Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    68Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    69Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    70Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    71Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    72Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    73Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    74Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    75Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a
    76Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    77Expression a.getOwner() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    78Type org.hibernate.test.propertyref.component.complete.Person of variable a.getOwner() does not match with type org.hibernate.test.propertyref.component.partial.Person of variable a.getOwner()
    79Type org.hibernate.test.propertyref.component.complete.Account of variable a does not match with type org.hibernate.test.propertyref.component.partial.Account of variable a