Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 2 | 0.994 | statement_list[14] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 92 | src/NHibernate.Test/Stats/StatsFixture.cs |
2 | 14 | 116 | src/NHibernate.Test/Stats/StatsFixture.cs |
| ||||
stats = sf.Statistics; stats.Clear(); stats.IsStatisticsEnabled = true; s = sf.OpenSession(); tx = s.BeginTransaction(); europe = FillDb(s); tx.Commit(); s.Clear(); tx = s.BeginTransaction(); Assert.AreEqual(0, stats.CollectionLoadCount); Assert.AreEqual(0, stats.CollectionFetchCount); europe2 = s.Get < Continent > (europe.Id); Assert.AreEqual(1, stats.CollectionLoadCount); Assert.AreEqual(0, stats.CollectionFetchCount, "Should do direct load, not indirect second load when lazy false and JOIN"); |
| ||||
stats = sf.Statistics; stats.Clear(); stats.IsStatisticsEnabled = true; s = sf.OpenSession(); tx = s.BeginTransaction(); europe = FillDb(s); tx.Commit(); s.Clear(); tx = s.BeginTransaction(); Assert.AreEqual(0, stats.CollectionLoadCount); Assert.AreEqual(0, stats.CollectionFetchCount); europe2 = s.Get < Continent > (europe.Id); Assert.AreEqual(1, stats.CollectionLoadCount); Assert.AreEqual(1, stats.CollectionFetchCount, "Should do explicit collection load, not part of the first one"); |
| |||
stats = sf.Statistics; stats.Clear(); stats.IsStatisticsEnabled = true; s = sf.OpenSession(); tx = s.BeginTransaction(); europe = FillDb(s); tx.Commit(); s.Clear(); tx = s.BeginTransaction(); Assert.AreEqual(0, stats.CollectionLoadCount); Assert.AreEqual(0, stats.CollectionFetchCount); europe2 = s.Get < Continent > (europe.Id); Assert.AreEqual(1, stats.CollectionLoadCount); Assert.AreEqual( [[#variable68731740]], stats.CollectionFetchCount, [[#variable68731660]]); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#68731740]] | 1 |
1 | 2 | [[#68731740]] | 0 |
2 | 1 | [[#68731660]] | "Should do explicit collection load, not part of the first one" |
2 | 2 | [[#68731660]] | "Should do direct load, not indirect second load when lazy false and JOIN" |