CloneSet319


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21230.989class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12134
src/NHibernate.Test/Legacy/SQLLoaderTest.cs
22257
src/NHibernate.Test/Legacy/SQLLoaderTest.cs
Clone Instance
1
Line Count
21
Source Line
34
Source File
src/NHibernate.Test/Legacy/SQLLoaderTest.cs

                [Test]
                public void TS()
                {
                        if (Dialect is Oracle8iDialect)
                        {
                                return;
                        }

                        ISession session = OpenSession();
                        ITransaction txn = session.BeginTransaction();

                        Simple sim = new Simple();
                        sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server
                        session.Save(sim, 1L);
                        IQuery q = session.CreateSQLQuery("select {sim.*} from Simple {sim} where {sim}.date_ = ?").
                                 AddEntity("sim", typeof(Simple));
                        q.SetTimestamp(0, sim.Date);
                        Assert.AreEqual(1, q.List().Count, "q.List.Count");
                        session.Delete(sim);
                        txn.Commit();
                        session.Close();
                }



Clone Instance
2
Line Count
22
Source Line
57
Source File
src/NHibernate.Test/Legacy/SQLLoaderTest.cs

                [Test]
                public void TSNamed()
                {
                        if (Dialect is Oracle8iDialect)
                        {
                                return;
                        }

                        ISession session = OpenSession();
                        ITransaction txn = session.BeginTransaction();

                        Simple sim = new Simple();
                        sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server
                        session.Save(sim, 1L);
                        IQuery q =
                                session.CreateSQLQuery("select {sim.*} from Simple {sim} where {sim}.date_ = :fred").
                                 AddEntity("sim", typeof(Simple));
                        q.SetTimestamp("fred", sim.Date);
                        Assert.AreEqual(1, q.List().Count, "q.List.Count");
                        session.Delete(sim);
                        txn.Commit();
                        session.Close();
                }



Clone AbstractionParameter Count: 3Parameter Bindings

[Test]
public void [[#variable67b214c0]]()
{
   if (Dialect is Oracle8iDialect)
   {
      return;
   }
   ISession session = OpenSession();
   ITransaction txn = session.BeginTransaction();
   Simple sim = new Simple();
   sim.Date = DateTime.Today; // NB We don't use Now() due to the millisecond alignment problem with SQL Server
   session.Save(sim, 1L);
   IQuery q = session.CreateSQLQuery( [[#variable67b213a0]]).AddEntity("sim", typeof(Simple));
   q.SetTimestamp( [[#variable67b21320]], sim.Date);
   Assert.AreEqual(1, q.List().Count, "q.List.Count");
   session.Delete(sim);
   txn.Commit();
   session.Close();
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#67b214c0]]
TS 
12[[#67b214c0]]
TSNamed 
21[[#67b213a0]]
"select {sim.*} from Simple {sim} where {sim}.date_ = ?" 
22[[#67b213a0]]
"select {sim.*} from Simple {sim} where {sim}.date_ = :fred" 
31[[#67b21320]]
0 
32[[#67b21320]]
"fred"