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();
public void testNoUpdateManyToOne() throws Exception { Session s = openSession(); W w1 = new W(); W w2 = new W(); Z z = new Z(); z.setW(w1); s.save(z); s.flush(); z.setW(w2); s.flush(); s.connection().commit(); s.close(); s = openSession(); s.update(z); s.flush(); s.delete(z); s.delete("from W"); 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/MasterDetailTest.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 testMixNativeAssigned() throws Exception {
1
public void testNoUpdateManyToOne() throws Exception {
2
		Session s = openSession();
2
		Session s = openSession();
3
		Category c = new Category();
3
		
4
		c.setName("NAME");
5
		Assignable assn = new Assignable();
6
		assn.setId("i.d.");
7
		List l = new ArrayList();
8
		l.add(c);
9
		assn.setCategories(l);
10
		c.setAssignable(assn
4
W w1 = new W();
5
		W w2 = new W();
6
		Z z = new Z();
7
		z.setW(w1);
8
		s.save(z);
11
);
9
		s.flush();
12
		s.save(assn);
10
		z.setW(w2);
13
		s.flush();
11
		s.flush();
14
		s.connection().commit();
12
		s.connection().commit();
15
		s.close();
13
		s.close();
16
		s = openSession();
14
		s = openSession();
17
		s.delete(assn
15
		s.update(z);
16
		s.flush();
17
		s.delete(z);
18
);
18
		s.delete("from W");
19
		s.flush();
19
		s.flush();
20
		s.connection().commit();
20
		s.connection().commit();
21
		s.close();
21
		s.close();
22
	
22
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0