public void testBagOneToMany() throws Exception {
Session s = openSession();
Baz baz = new Baz();
List list = new ArrayList();
baz.setBazez(list);
list.add( new Baz() );
s.save(baz);
s.flush();
list.add( new Baz() );
s.flush();
list.add( 0, new Baz() );
s.flush();
s.delete( list.remove(1) );
s.flush();
s.delete(baz);
s.flush();
s.connection().commit();
s.close();
public void testMixNativeAssigned() throws Exception {
Session s = openSession();
Category c = new Category();
c.setName("NAME");
Assignable assn = new Assignable();
assn.setId("i.d.");
List l = new ArrayList();
l.add(c);
assn.setCategories(l);
c.setAssignable(assn);
s.save(assn);
s.flush();
s.connection().commit();
s.close();
s = openSession();
s.delete(assn);
s.flush();
s.connection().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/legacy/FooBarTest.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/MasterDetailTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public void testBagOneToMany() throws Exception {↵ | | 1 | public void testMixNativeAssigned() throws Exception {↵
|
|
2 | Session s = openSession();↵ | | 2 | Session s = openSession();↵
|
3 | Baz baz = new Baz();↵ | | 3 | ↵
|
4 | List list = new ArrayList();↵ | | |
|
5 | baz.setBazez(list↵ | | 4 | Category c = new Category();↵
|
| | | 5 | c.setName("NAME");↵
|
| | | 6 | Assignable assn = new Assignable();↵
|
6 | );↵ | | 7 | assn.setId("i.d.");↵
|
7 | list.add( new Baz() );↵ | | 8 | List↵
|
8 | s.save(baz);↵ | | |
|
9 | s.flush();↵ | | |
|
10 | list.add( new Baz() );↵ | | |
|
11 | s.flush();↵ | | |
|
12 | list.add( 0, new Baz() );↵ | | |
|
13 | s.flush();↵ | | |
|
14 | s.delete( list.remove(1) );↵ | | |
|
15 | s.flush↵ | | 9 | l = new ArrayList();↵
|
| | | 10 | l.add(c);↵
|
| | | 11 | assn.setCategories(l);↵
|
| | | 12 | c.setAssignable(assn);↵
|
| | | 13 | s.save(assn);↵
|
| | | 14 | s.flush();↵
|
| | | 15 | s.connection().commit();↵
|
| | | 16 | s.close();↵
|
16 | ();↵ | | 17 | s = openSession();↵
|
17 | s.delete(baz);↵ | | 18 | s.delete(assn);↵
|
18 | s.flush();↵ | | 19 | s.flush();↵
|
19 | s.connection().commit();↵ | | 20 | s.connection().commit();↵
|
20 | s.close();↵ | | 21 | s.close();↵
|
21 | | | 22 |
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |