CloneSet532


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
13250.977class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11395
src/NHibernate.Test/NHSpecificTest/NH1280/NH1280Fixture.cs
213112
src/NHibernate.Test/NHSpecificTest/NH1280/NH1280Fixture.cs
Clone Instance
1
Line Count
13
Source Line
95
Source File
src/NHibernate.Test/NHSpecificTest/NH1280/NH1280Fixture.cs

                [Test]
                public void HavingOnLtAverage()
                {
                        using (ISession s = OpenSession())
                        {
                                using (ITransaction tx = s.BeginTransaction())
                                {
                                        //Find the iq that two people share
                                        string name = s.CreateCriteria( typeof(Person)).
                                                 SetProjection(Projections.GroupProperty("Name")).
                                                 Add  (Restrictions.Lt(Projections.Avg("IQ"), 20)).UniqueResult<string> ();
                                        Assert.AreEqual("Joe", name);
                                        tx.Commit();
                                }
                        }
                }



Clone Instance
2
Line Count
13
Source Line
112
Source File
src/NHibernate.Test/NHSpecificTest/NH1280/NH1280Fixture.cs

                [Test]
                public void HavingOnEqProjection()
                {
                        using (ISession s = OpenSession())
                        {
                                using (ITransaction tx = s.BeginTransaction())
                                {
                                        //SELECT this_.Name as y0_ FROM Person this_ GROUP BY this_.Name HAVING this_.Name = @p0; @p0 = 'Joe'
                                        string name = s.CreateCriteria( typeof(Person)).
                                                 SetProjection(Projections.GroupProperty("Name")).
                                                 Add  (Restrictions.Eq(Projections.GroupProperty("Name"), "Joe")).UniqueResult<string> ();
                                        Assert.AreEqual("Joe", name);
                                        tx.Commit();
                                }
                        }
                }



Clone AbstractionParameter Count: 5Parameter Bindings

[Test]
public void [[#variable297b4300]]()
{
   using (ISession s = OpenSession())
   {
      using (ITransaction tx = s.BeginTransaction())
      {
         //Find the iq that two people share
         //SELECT this_.Name as y0_ FROM Person this_ GROUP BY this_.Name HAVING this_.Name = @p0; @p0 = 'Joe'
         string name = s.CreateCriteria( typeof(Person)).SetProjection(Projections.GroupProperty("Name")).Add(Restrictions. [[#variable297b42a0]](Projections. [[#variable297b4220]]( [[#variable297b4160]]), [[#variable297b40c0]])).UniqueResult<string> ();
         Assert.AreEqual("Joe", name);
         tx.Commit();
      }
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#297b4300]]
HavingOnLtAverage 
12[[#297b4300]]
HavingOnEqProjection 
21[[#297b42a0]]
Lt 
22[[#297b42a0]]
Eq 
31[[#297b4220]]
Avg 
32[[#297b4220]]
GroupProperty 
41[[#297b4160]]
"IQ" 
42[[#297b4160]]
"Name" 
51[[#297b40c0]]
20 
52[[#297b40c0]]
"Joe"