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.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 );
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: void testSQLFunctions() Method name: void testSQLFunctions()
Number of AST nodes: 4 Number of AST nodes: 4
1
assertTrue(
1
assertTrue(
2
				s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2
2
				s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size()==2
3
			);
3
			);
4
			t.commit();
4
			t.commit();
5
			t = s.beginTransaction();
5
			t = s.beginTransaction();
6
			assertTrue(
6
			assertTrue(
7
				s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2
7
				s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size()==2
8
			);
8
			);
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 in different classes having the same super class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    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
    30
    assertTrue(s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size() == 2);
    32
    assertTrue(s.find("from Simple s where s.count > ( select min(sim.count) from Simple sim )").size() == 2);
    31
    t.commit();
    33
    t.commit();
    32
    t = s.beginTransaction();
    34
    t = s.beginTransaction();
    33
    assertTrue(s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size() == 2);
    35
    assertTrue(s.find("from Simple s where s = some( select sim from Simple sim where sim.count>=0 ) and s.count >= 0").size() == 2);
    Precondition Violations (0)
    Row Violation