CloneSet190


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
28230.960statement_list[16]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12895
src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs
226163
src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs
Clone Instance
1
Line Count
28
Source Line
95
Source File
src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs

                        User u = new User("gavin", "hb", "secret");
                        s.Persist(u);

                        t.Commit();
                        s.Close();

                        sessions.Statistics.Clear();

                        s = OpenSession();
                        t = s.BeginTransaction();

                        u =
                                (User)
                                s.CreateCriteria( typeof( User)).Add(Restrictions.NaturalId().Set("name", "gavin").Set("org", "hb")).SetCacheable(
                                        true).UniqueResult();

                        Assert.That(u, Is.Not.Null);

                        t.Commit();
                        s.Close();

                        Assert.AreEqual(1, sessions.Statistics.QueryExecutionCount);
                        Assert.AreEqual(0, sessions.Statistics.QueryCacheHitCount);
                        Assert.AreEqual(1, sessions.Statistics.QueryCachePutCount);

                        sessions.Statistics.Clear();

                        s = OpenSession();


Clone Instance
2
Line Count
26
Source Line
163
Source File
src/NHibernate.Test/Naturalid/Mutable/MutableNaturalIdFixture.cs

                        User u = new User("gavin", "hb", "secret");
                        s.Persist(u);

                        t.Commit();
                        s.Close();

                        sessions.Statistics.Clear();

                        s = OpenSession();
                        t = s.BeginTransaction();

                        u = (User) s.CreateCriteria( typeof( User)).
                                 Add(Restrictions.NaturalId().Set("name", "gavin").Set("org", "hb")).
                                 SetCacheable(true).UniqueResult();

                        Assert.That(u, Is.Not.Null);

                        t.Commit();
                        s.Close();

                        Assert.AreEqual(1, sessions.Statistics.QueryExecutionCount);
                        Assert.AreEqual(0, sessions.Statistics.QueryCacheHitCount);
                        Assert.AreEqual(1, sessions.Statistics.QueryCachePutCount);

                        s = OpenSession();
                        t = s.BeginTransaction();


Clone AbstractionParameter Count: 3Parameter Bindings

User u = new User("gavin", "hb", "secret");
s.Persist(u);
t.Commit();
s.Close();
sessions.Statistics.Clear();
s = OpenSession();
t = s.BeginTransaction();
u = (User)s.CreateCriteria( typeof(User)).Add(Restrictions.NaturalId().Set("name", "gavin").Set("org", "hb")).SetCacheable(true).UniqueResult();
Assert.That(u, Is.Not.Null);
t.Commit();
s.Close();
Assert.AreEqual(1, sessions.Statistics.QueryExecutionCount);
Assert.AreEqual(0, sessions.Statistics.QueryCacheHitCount);
Assert.AreEqual(1, sessions.Statistics.QueryCachePutCount);
 [[#variable4d5759c0]];
 [[#variable49dbfde0]]= [[#variable4d575340]]();
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4d5759c0]]
sessions.Statistics.Clear() 
12[[#4d5759c0]]
s = OpenSession() 
21[[#49dbfde0]]
s 
22[[#49dbfde0]]
t 
31[[#4d575340]]
OpenSession 
32[[#4d575340]]
s.BeginTransaction