CloneSet281


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24240.982class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
124278
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs
224304
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs
Clone Instance
1
Line Count
24
Source Line
278
Source File
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs

                [Test]
                public void CanAddCriteriaWithKeyAndRetrieveResultsWithKey()
                {
                        CreateItems();

                        using (ISession session = OpenSession())
                        {
                                IMultiCriteria multiCriteria = session.CreateMultiCriteria();

                                ICriteria firstCriteria = session.CreateCriteria( typeof(Item)).
                                         Add              (Expression.Lt("id", 50));

                                ICriteria secondCriteria = session.CreateCriteria( typeof(Item));

                                multiCriteria.Add("firstCriteria", firstCriteria);
                                multiCriteria.Add("secondCriteria", secondCriteria);

                                IList secondResult = (IList)multiCriteria.GetResult("secondCriteria");
                                IList firstResult = (IList)multiCriteria.GetResult("firstCriteria");

                                Assert.Greater(secondResult.Count, firstResult.Count);
                        }

                        RemoveAllItems();
                }



Clone Instance
2
Line Count
24
Source Line
304
Source File
src/NHibernate.Test/QueryTest/MultiCriteriaFixture.cs

                [Test]
                public void CanAddDetachedCriteriaWithKeyAndRetrieveResultsWithKey()
                {
                        CreateItems();

                        using (ISession session = OpenSession())
                        {
                                IMultiCriteria multiCriteria = session.CreateMultiCriteria();

                                DetachedCriteria firstCriteria = DetachedCriteria.For( typeof(Item)).
                                         Add                     (Expression.Lt("id", 50));

                                DetachedCriteria secondCriteria = DetachedCriteria.For( typeof(Item));

                                multiCriteria.Add("firstCriteria", firstCriteria);
                                multiCriteria.Add("secondCriteria", secondCriteria);

                                IList secondResult = (IList)multiCriteria.GetResult("secondCriteria");
                                IList firstResult = (IList)multiCriteria.GetResult("firstCriteria");

                                Assert.Greater(secondResult.Count, firstResult.Count);
                        }

                        RemoveAllItems();
                }



Clone AbstractionParameter Count: 4Parameter Bindings

[Test]
public void [[#variable6f48df80]]()
{
   CreateItems();
   using (ISession session = OpenSession())
   {
      IMultiCriteria multiCriteria = session.CreateMultiCriteria();
       [[#variable6f48df00]]firstCriteria = [[#variable6f48daa0]]. [[#variable6f48df40]]( typeof(Item)).Add(Expression.Lt("id", 50));
       [[#variable6f48df00]]secondCriteria = [[#variable6f48daa0]]. [[#variable6f48df40]]( typeof(Item));
      multiCriteria.Add("firstCriteria", firstCriteria);
      multiCriteria.Add("secondCriteria", secondCriteria);
      IList secondResult = (IList)multiCriteria.GetResult("secondCriteria");
      IList firstResult = (IList)multiCriteria.GetResult("firstCriteria");
      Assert.Greater(secondResult.Count, firstResult.Count);
   }
   RemoveAllItems();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6f48df80]]
CanAddCriteriaWithKeyAndRetrieveResultsWithKey 
12[[#6f48df80]]
CanAddDetachedCriteriaWithKeyAndRetrieveResultsWithKey 
21[[#6f48df00]]
ICriteria 
22[[#6f48df00]]
DetachedCriteria 
31[[#6f48daa0]]
session 
32[[#6f48daa0]]
DetachedCriteria 
41[[#6f48df40]]
CreateCriteria 
42[[#6f48df40]]
For