if ( ! (getDialect() instanceof MySQLDialect) && ! (getDialect() instanceof HSQLDialect) ) { //My SQL has no subqueries assertTrue( s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2 ); t.commit(); t = s.beginTransaction(); assertTrue( s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2 ); assertTrue( s.find("from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0").size()==1
if ( ! (getDialect() instanceof MySQLDialect) && ! (getDialect() instanceof HSQLDialect) ) { //My SQL has no subqueries assertTrue( s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2 ); t.commit(); t = s.beginTransaction(); assertTrue( s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2 ); assertTrue( s.find("from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0").size()==1
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/dialect/functional/cache/SQLFunctionsInterSystemsTest.java File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/SQLFunctionsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
if ( ! (getDialect() instanceof MySQLDialect) && ! (getDialect() instanceof HSQLDialect) ) { //My SQL has no subqueries
1
if ( ! (getDialect() instanceof MySQLDialect) && ! (getDialect() instanceof HSQLDialect) ) { //My SQL has no subqueries
2
			assertTrue(
2
			assertTrue(
3
				s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2
3
				s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2
4
			);
4
			);
5
			t.commit();
5
			t.commit();
6
			t = s.beginTransaction();
6
			t = s.beginTransaction();
7
			assertTrue(
7
			assertTrue(
8
				s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2
8
				s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2
9
			);
9
			);
10
			assertTrue(
10
			assertTrue(
11
				s.find("from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0").size()==1
11
				s.find("from Simple s where s = some( select sim from Simple sim where sim.other.count=s.other.count ) and s.other.count > 0").size()==1
12
			
12
			
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