Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 4 | 0.953 | statement_list[5] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 10 | 17 | src/NHibernate.Test/QueryTest/CountFixture.cs |
2 | 11 | 34 | 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(); |
| ||||
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(); |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#2c5bd8e0]] | AddSqlFunction |
1 | 2 | [[#2c5bd8e0]] | SetProperty |
2 | 1 | [[#2c5bd040]] | "count" |
2 | 2 | [[#2c5bd040]] | Environment.Hbm2ddlAuto |
3 | 1 | [[#4699ff60]] | new ClassicCountFunction() |
3 | 2 | [[#4699ff60]] | "create-drop" |
4 | 1 | [[#4699fe60]] | Int32 |
4 | 2 | [[#4699fe60]] | Int64 |