CloneSet518


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
11210.985non_pp_embedded_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11127
src/NHibernate.Test/NHSpecificTest/NH1077/Fixture.cs
21172
src/NHibernate.Test/NHSpecificTest/NH1275/Fixture.cs
Clone Instance
1
Line Count
11
Source Line
27
Source File
src/NHibernate.Test/NHSpecificTest/NH1077/Fixture.cs

                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                A a = s.Get < A > (savedId);
                                using (SqlLogSpy sqlLogSpy = new SqlLogSpy())
                                {
                                        s.Lock(a, LockMode.Upgrade);
                                        string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage;
                                        Assert.Less(0, sql.IndexOf("with (updlock"));
                                }
                                t.Commit();
                        }


Clone Instance
2
Line Count
11
Source Line
72
Source File
src/NHibernate.Test/NHSpecificTest/NH1275/Fixture.cs

                        using (ISession s = OpenSession())
                        using (ITransaction t = s.BeginTransaction())
                        {
                                A a = s.Get < A > (savedId);
                                using (SqlLogSpy sqlLogSpy = new SqlLogSpy())
                                {
                                        s.Lock(a, LockMode.Upgrade);
                                        string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage;
                                        Assert.Less(0, sql.IndexOf(Dialect.ForUpdateString));
                                }
                                t.Commit();
                        }


Clone AbstractionParameter Count: 1Parameter Bindings

using (ISession s = OpenSession())
   using (ITransaction t = s.BeginTransaction())
   {
      A a = s.Get < A > (savedId);
      using (SqlLogSpy sqlLogSpy = new SqlLogSpy())
      {
         s.Lock(a, LockMode.Upgrade);
         string sql = sqlLogSpy.Appender.GetEvents()[0].RenderedMessage;
         Assert.Less(0, sql.IndexOf( [[#variable70a8ecc0]]));
      }
      t.Commit();
   }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#70a8ecc0]]
Dialect.ForUpdateString 
12[[#70a8ecc0]]
"with (updlock"