CloneSet757


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
11240.953statement_list[5]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11017
src/NHibernate.Test/QueryTest/CountFixture.cs
21134
src/NHibernate.Test/QueryTest/CountFixture.cs
Clone Instance
1
Line Count
10
Source Line
17
Source File
src/NHibernate.Test/QueryTest/CountFixture.cs

                        cfg.AddResource("NHibernate.DomainModel.Simple.hbm.xml", typeof(Simple).Assembly);
                        cfg.SetProperty(Environment.Hbm2ddlAuto, "create-drop");
                        ISessionFactory sf = cfg.BuildSessionFactory();

                        using (ISession s = sf.OpenSession())
                        {
                                object count = s.CreateQuery("select count(*) from Simple").UniqueResult();
                                Assert.IsTrue(count is Int64);
                        }
                        sf.Close();


Clone Instance
2
Line Count
11
Source Line
34
Source File
src/NHibernate.Test/QueryTest/CountFixture.cs

                        cfg.AddResource("NHibernate.DomainModel.Simple.hbm.xml", typeof(Simple).Assembly);
                        cfg.AddSqlFunction("count", new ClassicCountFunction());

                        ISessionFactory sf = cfg.BuildSessionFactory();

                        using (ISession s = sf.OpenSession())
                        {
                                object count = s.CreateQuery("select count(*) from Simple").UniqueResult();
                                Assert.IsTrue(count is Int32);
                        }
                        sf.Close();


Clone AbstractionParameter Count: 4Parameter Bindings

cfg.AddResource("NHibernate.DomainModel.Simple.hbm.xml", typeof(Simple).Assembly);
cfg. [[#variable2c5bd8e0]]( [[#variable2c5bd040]], [[#variable4699ff60]]);
ISessionFactory sf = cfg.BuildSessionFactory();
using (ISession s = sf.OpenSession())
{
   object count = s.CreateQuery("select count(*) from Simple").UniqueResult();
   Assert.IsTrue(count is [[#variable4699fe60]]);
}
sf.Close();
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2c5bd8e0]]
AddSqlFunction 
12[[#2c5bd8e0]]
SetProperty 
21[[#2c5bd040]]
"count" 
22[[#2c5bd040]]
Environment.Hbm2ddlAuto 
31[[#4699ff60]]
new ClassicCountFunction() 
32[[#4699ff60]]
"create-drop" 
41[[#4699fe60]]
Int32 
42[[#4699fe60]]
Int64