byte[] original = buildRecursively( BLOB_SIZE, true ); byte[] changed = buildRecursively( BLOB_SIZE, false ); Session s = openSession(); s.beginTransaction(); LobHolder entity = new LobHolder(); entity.setBlobLocator( Hibernate.createBlob( original ) ); s.save( entity ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() ); assertEquals( BLOB_SIZE, entity.getBlobLocator().length() ); assertEquals( original, extractData( entity.getBlobLocator() ) ); s.getTransaction().commit(); s.close(); // test mutation via setting the new clob data... if ( supportsLobValueChangePropogation() ) { s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); entity.getBlobLocator().truncate( 1 ); entity.getBlobLocator().setBytes( 1, changed ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); assertNotNull( entity.getBlobLocator() ); assertEquals( BLOB_SIZE, entity.getBlobLocator().length() ); assertEquals( changed, extractData( entity.getBlobLocator() ) ); entity.getBlobLocator().truncate( 1 ); entity.getBlobLocator().setBytes( 1, original ); s.getTransaction().commit(); s.close(); } // test mutation via supplying a new clob locator instance... s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); assertNotNull( entity.getBlobLocator() ); assertEquals( BLOB_SIZE, entity.getBlobLocator().length() ); assertEquals( original, extractData( entity.getBlobLocator() ) ); entity.setBlobLocator( Hibernate.createBlob( changed ) ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() ); assertEquals( BLOB_SIZE, entity.getBlobLocator().length() ); assertEquals( changed, extractData( entity.getBlobLocator() ) ); s.delete( entity ); s.getTransaction().commit(); s.close();
String original = buildRecursively( CLOB_SIZE, 'x' ); String changed = buildRecursively( CLOB_SIZE, 'y' ); Session s = openSession(); s.beginTransaction(); LobHolder entity = new LobHolder(); entity.setClobLocator( Hibernate.createClob( original ) ); s.save( entity ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() ); assertEquals( CLOB_SIZE, entity.getClobLocator().length() ); assertEquals( original, extractData( entity.getClobLocator() ) ); s.getTransaction().commit(); s.close(); // test mutation via setting the new clob data... if ( supportsLobValueChangePropogation() ) { s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); entity.getClobLocator().truncate( 1 ); entity.getClobLocator().setString( 1, changed ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); assertNotNull( entity.getClobLocator() ); assertEquals( CLOB_SIZE, entity.getClobLocator().length() ); assertEquals( changed, extractData( entity.getClobLocator() ) ); entity.getClobLocator().truncate( 1 ); entity.getClobLocator().setString( 1, original ); s.getTransaction().commit(); s.close(); } // test mutation via supplying a new clob locator instance... s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE ); assertNotNull( entity.getClobLocator() ); assertEquals( CLOB_SIZE, entity.getClobLocator().length() ); assertEquals( original, extractData( entity.getClobLocator() ) ); entity.setClobLocator( Hibernate.createClob( changed ) ); s.getTransaction().commit(); s.close(); s = openSession(); s.beginTransaction(); entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() ); assertEquals( CLOB_SIZE, entity.getClobLocator().length() ); assertEquals( changed, extractData( entity.getClobLocator() ) ); s.delete( entity ); s.getTransaction().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/lob/BlobTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/lob/ClobTest.java
Method name: void testBoundedBlobLocatorAccess() Method name: void testBoundedClobLocatorAccess()
Number of AST nodes: 51 Number of AST nodes: 51
1
byte[] original = buildRecursively( BLOB_SIZE, true );
1
String original = buildRecursively( CLOB_SIZE, 'x' );
2
		byte[] changed = buildRecursively( BLOB_SIZE, false );
2
		String changed = buildRecursively( CLOB_SIZE, 'y' );
3
		Session s = openSession();
3
		Session s = openSession();
4
		s.beginTransaction();
4
		s.beginTransaction();
5
		LobHolder entity = new LobHolder();
5
		LobHolder entity = new LobHolder();
6
		entity.setBlobLocator( Hibernate.createBlob( original ) );
6
		entity.setClobLocator( Hibernate.createClob( original ) );
7
		s.save( entity );
7
		s.save( entity );
8
		s.getTransaction().commit();
8
		s.getTransaction().commit();
9
		s.close();
9
		s.close();
10
		s = openSession();
10
		s = openSession();
11
		s.beginTransaction();
11
		s.beginTransaction();
12
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
12
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
13
		assertEquals( BLOB_SIZE, entity.getBlobLocator().length() );
13
		assertEquals( CLOB_SIZE, entity.getClobLocator().length() );
14
		assertEquals( original, extractData( entity.getBlobLocator() ) );
14
		assertEquals( original, extractData( entity.getClobLocator() ) );
15
		s.getTransaction().commit();
15
		s.getTransaction().commit();
16
		s.close();
16
		s.close();
17
		// test mutation via setting the new clob data...
17
		// test mutation via setting the new clob data...
18
		if ( supportsLobValueChangePropogation() ) {
18
		if ( supportsLobValueChangePropogation() ) {
19
			s = openSession();
19
			s = openSession();
20
			s.beginTransaction();
20
			s.beginTransaction();
21
			entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
21
			entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
22
			entity.getBlobLocator().truncate( 1 );
22
			entity.getClobLocator().truncate( 1 );
23
			entity.getBlobLocator().setBytes( 1, changed );
23
			entity.getClobLocator().setString( 1, changed );
24
			s.getTransaction().commit();
24
			s.getTransaction().commit();
25
			s.close();
25
			s.close();
26
			s = openSession();
26
			s = openSession();
27
			s.beginTransaction();
27
			s.beginTransaction();
28
			entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
28
			entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
29
			assertNotNull( entity.getBlobLocator() );
29
			assertNotNull( entity.getClobLocator() );
30
			assertEquals( BLOB_SIZE, entity.getBlobLocator().length() );
30
			assertEquals( CLOB_SIZE, entity.getClobLocator().length() );
31
			assertEquals( changed, extractData( entity.getBlobLocator() ) );
31
			assertEquals( changed, extractData( entity.getClobLocator() ) );
32
			entity.getBlobLocator().truncate( 1 );
32
			entity.getClobLocator().truncate( 1 );
33
			entity.getBlobLocator().setBytes( 1, original );
33
			entity.getClobLocator().setString( 1, original );
34
			s.getTransaction().commit();
34
			s.getTransaction().commit();
35
			s.close();
35
			s.close();
36
		}
36
		}
37
		// test mutation via supplying a new clob locator instance...
37
		// test mutation via supplying a new clob locator instance...
38
		s = openSession();
38
		s = openSession();
39
		s.beginTransaction();
39
		s.beginTransaction();
40
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
40
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId(), LockMode.UPGRADE );
41
		assertNotNull( entity.getBlobLocator() );
41
		assertNotNull( entity.getClobLocator() );
42
		assertEquals( BLOB_SIZE, entity.getBlobLocator().length() );
42
		assertEquals( CLOB_SIZE, entity.getClobLocator().length() );
43
		assertEquals( original, extractData( entity.getBlobLocator() ) );
43
		assertEquals( original, extractData( entity.getClobLocator() ) );
44
		entity.setBlobLocator( Hibernate.createBlob( changed ) );
44
		entity.setClobLocator( Hibernate.createClob( changed ) );
45
		s.getTransaction().commit();
45
		s.getTransaction().commit();
46
		s.close();
46
		s.close();
47
		s = openSession();
47
		s = openSession();
48
		s.beginTransaction();
48
		s.beginTransaction();
49
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
49
		entity = ( LobHolder ) s.get( LobHolder.class, entity.getId() );
50
		assertEquals( BLOB_SIZE, entity.getBlobLocator().length() );
50
		assertEquals( CLOB_SIZE, entity.getClobLocator().length() );
51
		assertEquals( changed, extractData( entity.getBlobLocator() ) );
51
		assertEquals( changed, extractData( entity.getClobLocator() ) );
52
		s.delete( entity );
52
		s.delete( entity );
53
		s.getTransaction().commit();
53
		s.getTransaction().commit();
54
		s.close();
54
		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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons563
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements49
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)79.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                          
    1
    String original = buildRecursively(CLOB_SIZE, 'x');
    1
    byte[] original = buildRecursively(BLOB_SIZE, true);
                                                                                                            
                                                                                                        
    2
    String changed = buildRecursively(CLOB_SIZE, 'y');
    2
    byte[] changed = buildRecursively(BLOB_SIZE, false);
                                                                                                            
    3
    Session s = openSession();
    3
    Session s = openSession();
    4
    s.beginTransaction();
    4
    s.beginTransaction();
    5
    LobHolder entity = new LobHolder();
    5
    LobHolder entity = new LobHolder();
    6
    entity.setBlobLocator(Hibernate.createBlob(original));
    6
    entity.setBlobLocator(Hibernate.createBlob(original));
    6
    entity.setClobLocator(Hibernate.createClob(original));
    Differences
    Expression1Expression2Difference
    setBlobLocatorsetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    createBlobcreateClobMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    byte[]java.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.setBlobLocator(Hibernate.createBlob(original)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.setClobLocator(Hibernate.createClob(original)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.setBlobLocator(Hibernate.createBlob(original)) is a void method call, and thus it cannot be parameterized
    Expression entity.setClobLocator(Hibernate.createClob(original)) is a void method call, and thus it cannot be parameterized
    Type java.sql.Blob of variable Hibernate.createBlob(original) does not match with type java.sql.Clob of variable Hibernate.createClob(original)
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    Type byte[] of variable original does not match with type java.lang.String of variable original
    • Make classes byte[] and java.lang.String extend a common superclass
    6
    entity.setClobLocator(Hibernate.createClob(original));
    7
    s.save(entity);
    7
    s.save(entity);
    8
    s.getTransaction().commit();
    8
    s.getTransaction().commit();
    9
    s.close();
    9
    s.close();
    10
    s = openSession();
    10
    s = openSession();
    11
    s.beginTransaction();
    11
    s.beginTransaction();
    12
    entity = (LobHolder)s.get(LobHolder.class, entity.getId());
    12
    entity = (LobHolder)s.get(LobHolder.class, entity.getId());
    13
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    13
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    14
    assertEquals(original, extractData(entity.getClobLocator()));
    Differences
    Expression1Expression2Difference
    BLOB_SIZEoriginalVARIABLE_NAME_MISMATCH
    intjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable BLOB_SIZE does not match with type java.lang.String of variable original
    14
    assertEquals(original, extractData(entity.getClobLocator()));
    14
    assertEquals(original, extractData(entity.getBlobLocator()));
    14
    assertEquals(original, extractData(entity.getBlobLocator()));
    40
    assertEquals(original, extractData(entity.getClobLocator()));
    Differences
    Expression1Expression2Difference
    byte[]java.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type byte[] of variable original does not match with type java.lang.String of variable original
    • Make classes byte[] and java.lang.String extend a common superclass
    40
    assertEquals(original, extractData(entity.getClobLocator()));
    15
    s.getTransaction().commit();
    15
    s.getTransaction().commit();
    16
    s.close();
    16
    s.close();
    17
    if (supportsLobValueChangePropogation())
    17
    if (supportsLobValueChangePropogation())
    18
    s = openSession();
    18
    s = openSession();
    19
    s.beginTransaction();
    19
    s.beginTransaction();
    20
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    20
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    21
    entity.getBlobLocator().truncate(1);
    21
    entity.getBlobLocator().truncate(1);
    21
    entity.getClobLocator().truncate(1);
    Differences
    Expression1Expression2Difference
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    21
    entity.getClobLocator().truncate(1);
    22
    entity.getBlobLocator().setBytes(1, changed);
    22
    entity.getBlobLocator().setBytes(1, changed);
    22
    entity.getClobLocator().setString(1, changed);
    Differences
    Expression1Expression2Difference
    setBytessetStringMETHOD_INVOCATION_NAME_MISMATCH
    byte[]java.lang.StringVARIABLE_TYPE_MISMATCH
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator().setBytes(1,changed) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator().setString(1,changed) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type byte[] of variable changed does not match with type java.lang.String of variable changed
    • Make classes byte[] and java.lang.String extend a common superclass
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    22
    entity.getClobLocator().setString(1, changed);
    23
    s.getTransaction().commit();
    23
    s.getTransaction().commit();
    24
    s.close();
    24
    s.close();
    25
    s = openSession();
    25
    s = openSession();
    26
    s.beginTransaction();
    26
    s.beginTransaction();
    27
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    27
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    28
    assertNotNull(entity.getBlobLocator());
    28
    assertNotNull(entity.getBlobLocator());
    28
    assertNotNull(entity.getClobLocator());
    Differences
    Expression1Expression2Difference
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    28
    assertNotNull(entity.getClobLocator());
    29
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    29
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    30
    assertEquals(changed, extractData(entity.getClobLocator()));
    Differences
    Expression1Expression2Difference
    BLOB_SIZEchangedVARIABLE_NAME_MISMATCH
    intjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable BLOB_SIZE does not match with type java.lang.String of variable changed
    30
    assertEquals(changed, extractData(entity.getClobLocator()));
    30
    assertEquals(changed, extractData(entity.getBlobLocator()));
    30
    assertEquals(changed, extractData(entity.getBlobLocator()));
    29
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    Differences
    Expression1Expression2Difference
    changedCLOB_SIZEVARIABLE_NAME_MISMATCH
    byte[]intVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type byte[] of variable changed does not match with type int of variable CLOB_SIZE
    29
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    31
    entity.getBlobLocator().truncate(1);
    31
    entity.getBlobLocator().truncate(1);
    31
    entity.getClobLocator().truncate(1);
    Differences
    Expression1Expression2Difference
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    31
    entity.getClobLocator().truncate(1);
    32
    entity.getBlobLocator().setBytes(1, original);
    32
    entity.getBlobLocator().setBytes(1, original);
    32
    entity.getClobLocator().setString(1, original);
    Differences
    Expression1Expression2Difference
    setBytessetStringMETHOD_INVOCATION_NAME_MISMATCH
    byte[]java.lang.StringVARIABLE_TYPE_MISMATCH
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator().setBytes(1,original) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator().setString(1,original) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type byte[] of variable original does not match with type java.lang.String of variable original
    • Make classes byte[] and java.lang.String extend a common superclass
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    32
    entity.getClobLocator().setString(1, original);
    33
    s.getTransaction().commit();
    33
    s.getTransaction().commit();
    34
    s.close();
    34
    s.close();
    35
    s = openSession();
    35
    s = openSession();
    36
    s.beginTransaction();
    36
    s.beginTransaction();
    37
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    37
    entity = (LobHolder)s.get(LobHolder.class, entity.getId(), LockMode.UPGRADE);
    38
    assertNotNull(entity.getBlobLocator());
    38
    assertNotNull(entity.getBlobLocator());
    38
    assertNotNull(entity.getClobLocator());
    Differences
    Expression1Expression2Difference
    getBlobLocatorgetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    38
    assertNotNull(entity.getClobLocator());
    39
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    39
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    48
    assertEquals(changed, extractData(entity.getClobLocator()));
    Differences
    Expression1Expression2Difference
    BLOB_SIZEchangedVARIABLE_NAME_MISMATCH
    intjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type int of variable BLOB_SIZE does not match with type java.lang.String of variable changed
    48
    assertEquals(changed, extractData(entity.getClobLocator()));
    40
    assertEquals(original, extractData(entity.getBlobLocator()));
    40
    assertEquals(original, extractData(entity.getBlobLocator()));
    39
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    Differences
    Expression1Expression2Difference
    originalCLOB_SIZEVARIABLE_NAME_MISMATCH
    byte[]intVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type byte[] of variable original does not match with type int of variable CLOB_SIZE
    39
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    41
    entity.setBlobLocator(Hibernate.createBlob(changed));
    41
    entity.setBlobLocator(Hibernate.createBlob(changed));
    41
    entity.setClobLocator(Hibernate.createClob(changed));
    Differences
    Expression1Expression2Difference
    setBlobLocatorsetClobLocatorMETHOD_INVOCATION_NAME_MISMATCH
    createBlobcreateClobMETHOD_INVOCATION_NAME_MISMATCH
    java.sql.Blobjava.sql.ClobVARIABLE_TYPE_MISMATCH
    byte[]java.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression entity.setBlobLocator(Hibernate.createBlob(changed)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.setClobLocator(Hibernate.createClob(changed)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entity.setBlobLocator(Hibernate.createBlob(changed)) is a void method call, and thus it cannot be parameterized
    Expression entity.setClobLocator(Hibernate.createClob(changed)) is a void method call, and thus it cannot be parameterized
    Type java.sql.Blob of variable Hibernate.createBlob(changed) does not match with type java.sql.Clob of variable Hibernate.createClob(changed)
    • Make classes java.sql.Blob and java.sql.Clob extend a common superclass
    Type byte[] of variable changed does not match with type java.lang.String of variable changed
    • Make classes byte[] and java.lang.String extend a common superclass
    41
    entity.setClobLocator(Hibernate.createClob(changed));
    42
    s.getTransaction().commit();
    42
    s.getTransaction().commit();
    43
    s.close();
    43
    s.close();
    44
    s = openSession();
    44
    s = openSession();
    45
    s.beginTransaction();
    45
    s.beginTransaction();
    46
    entity = (LobHolder)s.get(LobHolder.class, entity.getId());
    46
    entity = (LobHolder)s.get(LobHolder.class, entity.getId());
    47
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    47
    assertEquals(BLOB_SIZE, entity.getBlobLocator().length());
    49
    s.delete(entity);
    Differences
    Expression1Expression2Difference
    assertEqualsdeleteMETHOD_INVOCATION_NAME_MISMATCH
    assertEquals(BLOB_SIZE,entity.getBlobLocator().length())s.delete(entity)ARGUMENT_NUMBER_MISMATCH
    sMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) is a void method call, and thus it cannot be parameterized
    Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) is a void method call, and thus it cannot be parameterized
    Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    49
    s.delete(entity);
    48
    assertEquals(changed, extractData(entity.getBlobLocator()));
    48
    assertEquals(changed, extractData(entity.getBlobLocator()));
    47
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    Differences
    Expression1Expression2Difference
    changedCLOB_SIZEVARIABLE_NAME_MISMATCH
    byte[]intVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type byte[] of variable changed does not match with type int of variable CLOB_SIZE
    47
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    49
    s.delete(entity);
    49
    s.delete(entity);
    13
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    Differences
    Expression1Expression2Difference
    deleteassertEqualsMETHOD_INVOCATION_NAME_MISMATCH
    s.delete(entity)assertEquals(CLOB_SIZE,entity.getClobLocator().length())ARGUMENT_NUMBER_MISMATCH
    sMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) is a void method call, and thus it cannot be parameterized
    Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) is a void method call, and thus it cannot be parameterized
    13
    assertEquals(CLOB_SIZE, entity.getClobLocator().length());
    50
    s.getTransaction().commit();
    50
    s.getTransaction().commit();
    51
    s.close();
    51
    s.close();
    Precondition Violations (59)
    Row Violation
    1Expression entity.setBlobLocator(Hibernate.createBlob(original)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression entity.setClobLocator(Hibernate.createClob(original)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression entity.setBlobLocator(Hibernate.createBlob(original)) is a void method call, and thus it cannot be parameterized
    4Expression entity.setClobLocator(Hibernate.createClob(original)) is a void method call, and thus it cannot be parameterized
    5Type java.sql.Blob of variable Hibernate.createBlob(original) does not match with type java.sql.Clob of variable Hibernate.createClob(original)
    6Type byte[] of variable original does not match with type java.lang.String of variable original
    7Type int of variable BLOB_SIZE does not match with type java.lang.String of variable original
    8Type byte[] of variable original does not match with type java.lang.String of variable original
    9Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    12Expression entity.getBlobLocator().setBytes(1,changed) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression entity.getClobLocator().setString(1,changed) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Type byte[] of variable changed does not match with type java.lang.String of variable changed
    15Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    18Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    21Type int of variable BLOB_SIZE does not match with type java.lang.String of variable changed
    22Type byte[] of variable changed does not match with type int of variable CLOB_SIZE
    23Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    26Expression entity.getBlobLocator().setBytes(1,original) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression entity.getClobLocator().setString(1,original) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Type byte[] of variable original does not match with type java.lang.String of variable original
    29Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    30Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    32Expression entity.getBlobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    33Expression entity.getClobLocator() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    34Type java.sql.Blob of variable entity.getBlobLocator() does not match with type java.sql.Clob of variable entity.getClobLocator()
    35Type int of variable BLOB_SIZE does not match with type java.lang.String of variable changed
    36Type byte[] of variable original does not match with type int of variable CLOB_SIZE
    37Expression entity.setBlobLocator(Hibernate.createBlob(changed)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    38Expression entity.setClobLocator(Hibernate.createClob(changed)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    39Expression entity.setBlobLocator(Hibernate.createBlob(changed)) is a void method call, and thus it cannot be parameterized
    40Expression entity.setClobLocator(Hibernate.createClob(changed)) is a void method call, and thus it cannot be parameterized
    41Type java.sql.Blob of variable Hibernate.createBlob(changed) does not match with type java.sql.Clob of variable Hibernate.createClob(changed)
    42Type byte[] of variable changed does not match with type java.lang.String of variable changed
    43Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    44Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    45Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) is a void method call, and thus it cannot be parameterized
    46Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    47Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    48Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    49Expression assertEquals(BLOB_SIZE,entity.getBlobLocator().length()) is a void method call, and thus it cannot be parameterized
    50Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    51Type byte[] of variable changed does not match with type int of variable CLOB_SIZE
    52Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    53Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    54Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    55Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) is a void method call, and thus it cannot be parameterized
    56Expression s.delete(entity) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    57Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    58Expression s.delete(entity) is a void method call, and thus it cannot be parameterized
    59Expression assertEquals(CLOB_SIZE,entity.getClobLocator().length()) is a void method call, and thus it cannot be parameterized