Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
6 | 8 | 4 | 0.970 | statement_list[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 6 | 21 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
2 | 6 | 27 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
3 | 6 | 33 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
4 | 6 | 39 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
5 | 6 | 45 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
6 | 8 | 51 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
7 | 6 | 59 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
8 | 6 | 71 | src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs |
| ||||
Assert.AreEqual( "SELECT TOP 10 Contact1_19_0_, Rating2_19_0_ FROM (select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_, ROW_NUMBER() OVER(ORDER BY c.Rating DESC, c.Last_Name, c.First_Name) as __hibernate_sort_row from dbo.Contact c where COALESCE(c.Rating, 0) > 0) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT fish.id FROM fish"), 1, 10); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 10 id FROM (SELECT fish.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id FROM fish fish_"), 1, 10); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 10 id FROM (SELECT DISTINCT fish_.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT DISTINCT fish_.id as ixx9_ FROM fish fish_"), 1, 10); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 10 ixx9_ FROM (SELECT DISTINCT fish_.id as ixx9_, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT * FROM fish ORDER BY name"), 5, 15); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 15 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 5 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT fish.id, fish.name FROM fish ORDER BY name DESC"), 7, 28); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 28 id, name FROM (SELECT fish.id, fish.name, ROW_NUMBER() OVER(ORDER BY fish.name DESC) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 7 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString( new SqlString("SELECT * FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t ORDER BY name DESC"), 10, 20); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 20 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name DESC) as __hibernate_sort_row FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t) as query WHERE query.__hibernate_sort_row > 10 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count FROM fish"), 1, 10); System.Console.WriteLine(str); |
| ||||
Assert.AreEqual( "SELECT TOP 10 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish WHERE scales = ?) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row", str.ToString()); str = d.GetLimitString(new SqlString("SELECT f.Type, COUNT(DISTINCT f.Name) AS Name FROM Fish f GROUP BY f.Type ORDER BY COUNT(DISTINCT f.Name)"), 1, 10); System.Console.WriteLine(str); |
| |||
Assert.AreEqual( [[#variable6b976160]], str.ToString()); str = d.GetLimitString(new SqlString( [[#variable657d1440]]), [[#variable701ae740]], [[#variable6b976140]]); System.Console.WriteLine(str); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6b976160]] | "SELECT TOP 10 Contact1_19_0_, Rating2_19_0_ FROM (select distinct c.Contact_Id as Contact1_19_0_, c._Rating as Rating2_19_0_, ROW_NUMBER() OVER(ORDER BY c.Rating DESC, c.Last_Name, c.First_Name) as __hibernate_sort_row from dbo.Contact c where COALESCE(c.Rating, 0) > 0) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row" |
1 | 2 | [[#6b976160]] | "SELECT TOP 10 id FROM (SELECT fish.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row" |
1 | 3 | [[#6b976160]] | "SELECT TOP 10 id FROM (SELECT DISTINCT fish_.id, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row" |
1 | 4 | [[#6b976160]] | "SELECT TOP 10 ixx9_ FROM (SELECT DISTINCT fish_.id as ixx9_, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish fish_) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row" |
1 | 5 | [[#6b976160]] | "SELECT TOP 15 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 5 ORDER BY query.__hibernate_sort_row" |
1 | 6 | [[#6b976160]] | "SELECT TOP 28 id, name FROM (SELECT fish.id, fish.name, ROW_NUMBER() OVER(ORDER BY fish.name DESC) as __hibernate_sort_row FROM fish) as query WHERE query.__hibernate_sort_row > 7 ORDER BY query.__hibernate_sort_row" |
1 | 7 | [[#6b976160]] | "SELECT TOP 20 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY name DESC) as __hibernate_sort_row FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t) as query WHERE query.__hibernate_sort_row > 10 ORDER BY query.__hibernate_sort_row" |
1 | 8 | [[#6b976160]] | "SELECT TOP 10 * FROM (SELECT *, ROW_NUMBER() OVER(ORDER BY CURRENT_TIMESTAMP) as __hibernate_sort_row FROM fish WHERE scales = ?) as query WHERE query.__hibernate_sort_row > 1 ORDER BY query.__hibernate_sort_row" |
2 | 1 | [[#657d1440]] | "SELECT fish.id FROM fish" |
2 | 2 | [[#657d1440]] | "SELECT DISTINCT fish_.id FROM fish fish_" |
2 | 3 | [[#657d1440]] | "SELECT DISTINCT fish_.id as ixx9_ FROM fish fish_" |
2 | 4 | [[#657d1440]] | "SELECT * FROM fish ORDER BY name" |
2 | 5 | [[#657d1440]] | "SELECT fish.id, fish.name FROM fish ORDER BY name DESC" |
2 | 6 | [[#657d1440]] | "SELECT * FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t ORDER BY name DESC" |
2 | 7 | [[#657d1440]] | "SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count FROM fish" |
2 | 8 | [[#657d1440]] | "SELECT f.Type, COUNT(DISTINCT f.Name) AS Name FROM Fish f GROUP BY f.Type ORDER BY COUNT(DISTINCT f.Name)" |
3 | 1 | [[#701ae740]] | 1 |
3 | 2 | [[#701ae740]] | 1 |
3 | 3 | [[#701ae740]] | 1 |
3 | 4 | [[#701ae740]] | 5 |
3 | 5 | [[#701ae740]] | 7 |
3 | 6 | [[#701ae740]] | 10 |
3 | 7 | [[#701ae740]] | 1 |
3 | 8 | [[#701ae740]] | 1 |
4 | 1 | [[#6b976140]] | 10 |
4 | 2 | [[#6b976140]] | 10 |
4 | 3 | [[#6b976140]] | 10 |
4 | 4 | [[#6b976140]] | 15 |
4 | 5 | [[#6b976140]] | 28 |
4 | 6 | [[#6b976140]] | 20 |
4 | 7 | [[#6b976140]] | 10 |
4 | 8 | [[#6b976140]] | 10 |