Parent p = new Parent( String.valueOf( i + 100 ) ); Child child = new Child( "child" + i ); child.setParent( p ); p.getChildren().add( child ); s.save( p ); parents.add(p);
Parent p = new Parent( String.valueOf( i + 100 ) ); Child child = new Child( "child" + i ); child.setParent( p ); p.getChildren().add( child ); s.save( p ); parents.add(p);
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/reattachment/ProxyReattachmentTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/reattachment/ProxyReattachmentTest.java
Method name: void testIterateWithEvictTopOfLoop() Method name: void testIterateWithEvictBottomOfLoop()
Number of AST nodes: 6 Number of AST nodes: 6
1
Parent p = new Parent( String.valueOf( i + 100 ) );
1
Parent p = new Parent( String.valueOf( i + 100 ) );
2
			Child child = new Child( "child" + i );
2
			Child child = new Child( "child" + i );
3
			child.setParent( p );
3
			child.setParent( p );
4
			p.getChildren().add( child );
4
			p.getChildren().add( child );
5
			s.save( p );
5
			s.save( p );
6
			parents.add(p);
6
			parents.add(p);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons17
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    5
    Parent p = new Parent(String.valueOf(i + 100));
    5
    Parent p = new Parent(String.valueOf(i + 100));
    6
    Child child = new Child("child" + i);
    6
    Child child = new Child("child" + i);
    7
    child.setParent(p);
    7
    child.setParent(p);
    8
    p.getChildren().add(child);
    8
    p.getChildren().add(child);
    9
    s.save(p);
    9
    s.save(p);
    10
    parents.add(p);
    10
    parents.add(p);
    Precondition Violations (0)
    Row Violation