Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
8 | 2 | 2 | 0.980 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 8 | 5701 | src/NHibernate.Test/Legacy/FooBarTest.cs |
2 | 8 | 5714 | src/NHibernate.Test/Legacy/FooBarTest.cs |
| ||||
[Test] public void ParameterInHavingClause() { using (ISession s = OpenSession()) { s.CreateQuery("select f.id from Foo f group by f.id having count(f.id) >= ?"). SetInt32(0, 0). List(); } } |
| ||||
// It's possible that this test only works on MS SQL Server. If somebody complains about // the test not working on their DB, I'll put an if around the code to only run on MS SQL. [Test] public void ParameterInOrderByClause() { using (ISession s = OpenSession()) { s.CreateQuery("from Foo as foo order by case ? when 0 then foo.id else foo.id end"). SetInt32(0, 0). List(); } } |
| |||
// It's possible that this test only works on MS SQL Server. If somebody complains about // the test not working on their DB, I'll put an if around the code to only run on MS SQL. [Test] public void [[#variable6db3ee40]]() { using (ISession s = OpenSession()) { s.CreateQuery( [[#variable6db3eda0]]).SetInt32(0, 0).List(); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6db3ee40]] | ParameterInHavingClause |
1 | 2 | [[#6db3ee40]] | ParameterInOrderByClause |
2 | 1 | [[#6db3eda0]] | "select f.id from Foo f group by f.id having count(f.id) >= ?" |
2 | 2 | [[#6db3eda0]] | "from Foo as foo order by case ? when 0 then foo.id else foo.id end" |