oos.writeObject( role ); oos.writeObject( snapshot ); oos.writeObject( loadedKey );
s.merge( a ); s.merge( h ); fail( "should have thrown TransientObjectException" );
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/engine/CollectionEntry.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/cascade/MultiPathCascadeTest.java
Method name: void serialize(ObjectOutputStream) Method name: void testMultiPathMergeNonCascadedTransientEntityInManyToOne()
Number of AST nodes: 3 Number of AST nodes: 3
1
oos.writeObject( role );
2
		oos.writeObject( snapshot
1
s.merge( a );
3
 );
2
			s.merge( h );
4
		oos.writeObject( loadedKey );
3
			fail( "should have thrown TransientObjectException" );
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
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    oos.writeObject(role);
    1
    oos.writeObject(role);
    26
    fail("should have thrown TransientObjectException");
    Differences
    Expression1Expression2Difference
    writeObjectfailMETHOD_INVOCATION_NAME_MISMATCH
    role"should have thrown TransientObjectException"TYPE_COMPATIBLE_REPLACEMENT
    oosMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression oos.writeObject(role) is a void method call, and thus it cannot be parameterized
    Expression fail("should have thrown TransientObjectException") is a void method call, and thus it cannot be parameterized
    Expression oos.writeObject(role) is a void method call, and thus it cannot be parameterized
    Expression fail("should have thrown TransientObjectException") is a void method call, and thus it cannot be parameterized
    26
    fail("should have thrown TransientObjectException");
    2
    oos.writeObject(snapshot);
                                                              
    3
    oos.writeObject(loadedKey);
                                                                
    Precondition Violations (4)
    Row Violation
    1Expression oos.writeObject(role) is a void method call, and thus it cannot be parameterized
    2Expression fail("should have thrown TransientObjectException") is a void method call, and thus it cannot be parameterized
    3Expression oos.writeObject(role) is a void method call, and thus it cannot be parameterized
    4Expression fail("should have thrown TransientObjectException") is a void method call, and thus it cannot be parameterized