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 testIterateWithClearBottomOfLoop()
|
Method name: void testIterateWithEvictBottomOfLoop()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | for (int i=0; i<5; i++) {↵ | 1 | for (int i=0; i<5; i++) {↵ | |
2 | Parent p = new Parent( String.valueOf( i ) );↵ | 2 | Parent p = new Parent( String.valueOf( i + 100 ) );↵ | |
3 | Child child = new Child( "child" + i );↵ | 3 | Child child = new Child( "child" + i );↵ | |
4 | child.setParent( p );↵ | 4 | child.setParent( p );↵ | |
5 | p.getChildren().add( child );↵ | 5 | p.getChildren().add( child );↵ | |
6 | s.save( p );↵ | 6 | s.save( p );↵ | |
7 | parents.add(p);↵ | 7 | parents.add(p);↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 49 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | for (int i = 0; i < 5; i++) | 4 | for (int i = 0; i < 5; i++) | |||||||||||||
5 | Parent p = new Parent(String.valueOf(i)); |
| 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); |
Row | Violation |
---|---|
1 | Expression i cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression i + 100 cannot be parameterized, because it has dependencies to/from statements that will be extracted |