| 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.989 | statement_list[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 8 | 253 | src/NHibernate.Test/SecondLevelCacheTest/QueryCacheFixture.cs |
| 2 | 8 | 262 | src/NHibernate.Test/SecondLevelCacheTest/QueryCacheFixture.cs |
| ||||
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
s.CreateQuery(queryString).SetCacheable(true).SetResultTransformer(transformer).List();
tx.Commit();
}
Assert.That(qs.CacheHitCount, Is.EqualTo(1), "hit count should not go up since we are adding a resulttransformer");
|
| ||||
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
s.CreateQuery(queryString).SetCacheable(true).SetResultTransformer(transformer).List();
tx.Commit();
}
Assert.That(qs.CacheHitCount, Is.EqualTo(2), "hit count should go up since we are using the same resulttransformer");
|
| |||
using (ISession s = OpenSession())
using (ITransaction tx = s.BeginTransaction())
{
s.CreateQuery(queryString).SetCacheable(true).SetResultTransformer(transformer).List();
tx.Commit();
}
Assert.That(qs.CacheHitCount, Is.EqualTo( [[#variable4ef8bca0]]), [[#variable4ef8bc60]]);
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#4ef8bca0]] | 2 |
| 1 | 2 | [[#4ef8bca0]] | 1 |
| 2 | 1 | [[#4ef8bc60]] | "hit count should go up since we are using the same resulttransformer" |
| 2 | 2 | [[#4ef8bc60]] | "hit count should not go up since we are adding a resulttransformer" |