| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 14 | 3 | 3 | 0.985 | non_pp_embedded_statement |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 14 | 85 | src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs |
| 2 | 14 | 136 | src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs |
| 3 | 14 | 189 | src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs |
| ||||
using (ISession s = sessions.OpenSession())
{
IMultiQuery MultiQuery = s.CreateMultiQuery().
Add (s.CreateQuery("from Item i where i.Id > ?").
SetInt32(0, 50).
SetFirstResult(10)).
Add (s.CreateQuery("select count(*) from Item i where i.Id > ?").
SetInt32(0, 50));
MultiQuery.SetCacheable(true);
IList results = MultiQuery.List();
IList items = (IList)results[0];
Assert.AreEqual(2, items.Count);
long count = (long)((IList)results[1])[0];
Assert.AreEqual(2L, count);
}
|
| ||||
using (ISession s = OpenSession())
{
IMultiQuery MultiQuery = s.CreateMultiQuery().
Add (s.CreateQuery("from Item i where i.Id > ?").
SetInt32(0, 50).
SetFirstResult(10)).
Add (s.CreateQuery("select count(*) from Item i where i.Id > ?").
SetInt32(0, 50));
MultiQuery.SetCacheable(true);
IList results = MultiQuery.List();
IList items = (IList)results[0];
Assert.AreEqual(89, items.Count);
long count = (long)((IList)results[1])[0];
Assert.AreEqual(99L, count);
}
|
| ||||
using (ISession s = OpenSession())
{
IMultiQuery MultiQuery = s.CreateMultiQuery().
Add (s.CreateQuery("from Item i where i.Id > ?").
SetInt32(0, 50).
SetFirstResult(10)).
Add (s.CreateQuery("select count(*) from Item i where i.Id > ?").
SetInt32(0, 50));
MultiQuery.SetCacheable(true);
IList results = MultiQuery.List();
IList items = (IList)results[0];
Assert.AreEqual(89, items.Count);
long count = (long)((IList)results[1])[0];
Assert.AreEqual(99L, count);
}
|
| |||
using (ISession s = [[#variable703d7be0]]())
{
IMultiQuery MultiQuery = s.CreateMultiQuery().Add(s.CreateQuery("from Item i where i.Id > ?").SetInt32(0, 50).SetFirstResult(10)).Add(s.CreateQuery("select count(*) from Item i where i.Id > ?").SetInt32(0, 50));
MultiQuery.SetCacheable(true);
IList results = MultiQuery.List();
IList items = (IList)results[0];
Assert.AreEqual( [[#variable6e453200]], items.Count);
long count = (long)((IList)results[1])[0];
Assert.AreEqual( [[#variable703d7aa0]], count);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#703d7be0]] | OpenSession |
| 1 | 2 | [[#703d7be0]] | sessions.OpenSession |
| 1 | 3 | [[#703d7be0]] | OpenSession |
| 2 | 1 | [[#6e453200]] | 89 |
| 2 | 2 | [[#6e453200]] | 2 |
| 2 | 3 | [[#6e453200]] | 89 |
| 3 | 1 | [[#703d7aa0]] | 99L |
| 3 | 2 | [[#703d7aa0]] | 2L |
| 3 | 3 | [[#703d7aa0]] | 99L |