CloneSet101


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
12430.976class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11245
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs
21260
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs
31275
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs
41290
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs
Clone Instance
1
Line Count
12
Source Line
45
Source File
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs

                [Test]
                public void CanSumProjectionOnSqlFunction()
                {
                        using (ISession s = OpenSession())
                        {
                                ISQLFunction arithmaticAddition = new VarArgsSQLFunction("(", "+", ")");
                                ICriteria c =
                                        s.CreateCriteria( typeof( Person)).SetProjection(
                                                Projections.Sum(Projections.SqlFunction(arithmaticAddition, NHibernateUtil.GuessType( typeof( double)),
                                                                                        Projections.Property("IQ"), Projections.Property("ShoeSize"))));
                                IList list = c.List();
                                Assert.AreEqual(334, list[0]);
                        }
                }



Clone Instance
2
Line Count
12
Source Line
60
Source File
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs

                [Test]
                public void CanAvgProjectionOnSqlFunction()
                {
                        using (ISession s = OpenSession())
                        {
                                ISQLFunction arithmaticAddition = new VarArgsSQLFunction("(", "+", ")");
                                ICriteria c =
                                        s.CreateCriteria( typeof( Person)).SetProjection(
                                                Projections.Avg(Projections.SqlFunction(arithmaticAddition, NHibernateUtil.GuessType( typeof( double)),
                                                                                        Projections.Property("IQ"), Projections.Property("ShoeSize"))));
                                IList list = c.List();
                                Assert.AreEqual(((double) 334) / 5, list[0]);
                        }
                }



Clone Instance
3
Line Count
12
Source Line
75
Source File
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs

                [Test]
                public void CanMinProjectionOnIdentityProjection()
                {
                        using (ISession s = OpenSession())
                        {
                                ISQLFunction arithmaticAddition = new VarArgsSQLFunction("(", "+", ")");
                                ICriteria c =
                                        s.CreateCriteria( typeof( Person)).SetProjection(
                                                Projections.Min(Projections.SqlFunction(arithmaticAddition, NHibernateUtil.GuessType( typeof( double)),
                                                                                        Projections.Property("IQ"), Projections.Property("ShoeSize"))));
                                IList list = c.List();
                                Assert.AreEqual(19, list[0]);
                        }
                }



Clone Instance
4
Line Count
12
Source Line
90
Source File
src/NHibernate.Test/NHSpecificTest/NH1393/Fixture.cs

                [Test]
                public void CanMaxProjectionOnIdentityProjection()
                {
                        using (ISession s = OpenSession())
                        {
                                ISQLFunction arithmaticAddition = new VarArgsSQLFunction("(", "+", ")");
                                ICriteria c =
                                        s.CreateCriteria( typeof( Person)).SetProjection(
                                                Projections.Max(Projections.SqlFunction(arithmaticAddition, NHibernateUtil.GuessType( typeof( double)),
                                                                                        Projections.Property("IQ"), Projections.Property("ShoeSize"))));
                                IList list = c.List();
                                Assert.AreEqual(108, list[0]);
                        }
                }



Clone AbstractionParameter Count: 3Parameter Bindings

[Test]
public void [[#variable2d83af20]]()
{
   using (ISession s = OpenSession())
   {
      ISQLFunction arithmaticAddition = new VarArgsSQLFunction("(", "+", ")");
      ICriteria c = s.CreateCriteria( typeof(Person)).SetProjection(Projections. [[#variable2d83aec0]](Projections.SqlFunction(arithmaticAddition, NHibernateUtil.GuessType( typeof(double)), Projections.Property("IQ"), Projections.Property("ShoeSize"))));
      IList list = c.List();
      Assert.AreEqual( [[#variable2d83ae40]], list[0]);
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2d83af20]]
CanSumProjectionOnSqlFunction 
12[[#2d83af20]]
CanAvgProjectionOnSqlFunction 
13[[#2d83af20]]
CanMinProjectionOnIdentityProjection 
14[[#2d83af20]]
CanMaxProjectionOnIdentityProjection 
21[[#2d83aec0]]
Sum 
22[[#2d83aec0]]
Avg 
23[[#2d83aec0]]
Min 
24[[#2d83aec0]]
Max 
31[[#2d83ae40]]
334 
32[[#2d83ae40]]
((double)334) / 5 
33[[#2d83ae40]]
19 
34[[#2d83ae40]]
108