| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 27 | 2 | 0 | 1.000 | class_member_declarations[2] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 27 | 470 | src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs |
| 2 | 27 | 206 | src/NHibernate.Test/QueryTest/MultipleQueriesFixture.cs |
| ||||
private void CreateItems()
{
using (ISession s = OpenSession())
using (ITransaction t = s.BeginTransaction())
{
for (int i = 0; i < 150; i++)
{
Item item = new Item();
item.Id = i;
s.Save(item);
}
t.Commit();
}
}
private Hashtable GetHashTableUsedAsQueryCache()
{
ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
//need the inner hashtable in the cache
HashtableCache cache = (HashtableCache)
typeof(StandardQueryCache).
GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).
GetValue(factory.GetQueryCache(null));
return (Hashtable) typeof(HashtableCache).
GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).
GetValue(cache);
}
|
| ||||
private void CreateItems()
{
using (ISession s = OpenSession())
using (ITransaction t = s.BeginTransaction())
{
for (int i = 0; i < 150; i++)
{
Item item = new Item();
item.Id = i;
s.Save(item);
}
t.Commit();
}
}
private Hashtable GetHashTableUsedAsQueryCache()
{
ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
//need the inner hashtable in the cache
HashtableCache cache = (HashtableCache)
typeof(StandardQueryCache).
GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).
GetValue(factory.GetQueryCache(null));
return (Hashtable) typeof(HashtableCache).
GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).
GetValue(cache);
}
|
| |||
private void CreateItems()
{
using (ISession s = OpenSession())
using (ITransaction t = s.BeginTransaction())
{
for (int i = 0; i < 150; i++)
{
Item item = new Item();
item.Id = i;
s.Save(item);
}
t.Commit();
}
}
private Hashtable GetHashTableUsedAsQueryCache()
{
ISessionFactoryImplementor factory = (ISessionFactoryImplementor)sessions;
//need the inner hashtable in the cache
HashtableCache cache = (HashtableCache) typeof(StandardQueryCache).GetField("queryCache", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(factory.GetQueryCache(null));
return (Hashtable) typeof(HashtableCache).GetField("hashtable", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(cache);
}
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| None | |||