CloneSet176


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
6840.970statement_list[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1621
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
2627
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
3633
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
4639
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
5645
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
6851
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
7659
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
8671
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs
Clone Instance
1
Line Count
6
Source Line
21
Source File
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);


Clone Instance
2
Line Count
6
Source Line
27
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
3
Line Count
6
Source Line
33
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
4
Line Count
6
Source Line
39
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
5
Line Count
6
Source Line
45
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
6
Line Count
8
Source Line
51
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
7
Line Count
6
Source Line
59
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone Instance
8
Line Count
6
Source Line
71
Source File
src/NHibernate.Test/DialectTest/MsSql2005DialectFixture.cs

                        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);


Clone AbstractionParameter Count: 4Parameter Bindings

Assert.AreEqual( [[#variable6b976160]], str.ToString());
str = d.GetLimitString(new SqlString( [[#variable657d1440]]), [[#variable701ae740]], [[#variable6b976140]]);
System.Console.WriteLine(str);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#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" 
12[[#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" 
13[[#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" 
14[[#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" 
15[[#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" 
16[[#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" 
17[[#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" 
18[[#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" 
21[[#657d1440]]
"SELECT fish.id FROM fish" 
22[[#657d1440]]
"SELECT DISTINCT fish_.id FROM fish fish_" 
23[[#657d1440]]
"SELECT DISTINCT fish_.id as ixx9_ FROM fish fish_" 
24[[#657d1440]]
"SELECT * FROM fish ORDER BY name" 
25[[#657d1440]]
"SELECT fish.id, fish.name FROM fish ORDER BY name DESC" 
26[[#657d1440]]
"SELECT * FROM fish LEFT JOIN (SELECT * FROM meat ORDER BY weight) AS t ORDER BY name DESC" 
27[[#657d1440]]
"SELECT *, (SELECT COUNT(1) FROM fowl WHERE fish_id = fish.id) AS some_count FROM fish" 
28[[#657d1440]]
"SELECT f.Type, COUNT(DISTINCT f.Name) AS Name FROM Fish f GROUP BY f.Type ORDER BY COUNT(DISTINCT f.Name)" 
31[[#701ae740]]
1 
32[[#701ae740]]
1 
33[[#701ae740]]
1 
34[[#701ae740]]
5 
35[[#701ae740]]
7 
36[[#701ae740]]
10 
37[[#701ae740]]
1 
38[[#701ae740]]
1 
41[[#6b976140]]
10 
42[[#6b976140]]
10 
43[[#6b976140]]
10 
44[[#6b976140]]
15 
45[[#6b976140]]
28 
46[[#6b976140]]
20 
47[[#6b976140]]
10 
48[[#6b976140]]
10