Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
36 | 2 | 4 | 0.964 | statement_list[31] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 34 | 262 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
2 | 36 | 384 | src/NHibernate.Test/Legacy/MultiTableTest.cs |
| ||||
multi.Name = "new name"; s.Update(multi, mid); simp.Name = "new name"; s.Update(simp, sid); sm.Amount = 456.7F; s.Update(sm, smid); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi) s.Load( typeof(Multi), mid); Assert.AreEqual("extra2", multi.ExtraProp); multi.ExtraProp = multi.ExtraProp + "3"; Assert.AreEqual("new name", multi.Name); multi.Name = "newer name"; sm = (SubMulti) s.Load( typeof(SubMulti), smid); Assert.AreEqual(456.7F, sm.Amount); sm.Amount = 23423F; t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi) s.Load( typeof(Top), mid); simp = (Top) s.Load( typeof(Top), sid); Assert.IsFalse(simp is Multi); Assert.AreEqual("extra23", multi.ExtraProp); Assert.AreEqual("newer name", multi.Name); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); |
| ||||
multi.Name = "new name"; s.Update(multi, multiId); simp.Name = "new name"; s.Update(simp, simpId); sm.Amount = 456.7F; s.Update(sm, smId); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi) s.Load( typeof(Multi), multiId); Assert.AreEqual("extra2", multi.ExtraProp); multi.ExtraProp += "3"; Assert.AreEqual("new name", multi.Name); multi.Name = "newer name"; sm = (SubMulti) s.Load( typeof(SubMulti), smId); Assert.AreEqual(456.7F, sm.Amount); sm.Amount = 23423F; t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi) s.Load( typeof(Top), multiId); simp = (Top) s.Load( typeof(Top), simpId); Assert.IsFalse(simp is Multi); // Can't see the point of this test since the variable is declared as Multi! //Assert.IsTrue( multi is Multi ); Assert.AreEqual("extra23", multi.ExtraProp); Assert.AreEqual("newer name", multi.Name); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); |
| |||
multi.Name = "new name"; s.Update(multi, [[#variable6fee4620]]); simp.Name = "new name"; s.Update(simp, [[#variable6fee43e0]]); sm.Amount = 456.7F; s.Update(sm, [[#variable2cdc75e0]]); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi)s.Load( typeof(Multi), [[#variable6fee4620]]); Assert.AreEqual("extra2", multi.ExtraProp); [[#variable6e08dd20]]; Assert.AreEqual("new name", multi.Name); multi.Name = "newer name"; sm = (SubMulti)s.Load( typeof(SubMulti), [[#variable2cdc75e0]]); Assert.AreEqual(456.7F, sm.Amount); sm.Amount = 23423F; t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); multi = (Multi)s.Load( typeof(Top), [[#variable6fee4620]]); simp = (Top)s.Load( typeof(Top), [[#variable6fee43e0]]); Assert.IsFalse(simp is Multi); // Can't see the point of this test since the variable is declared as Multi! //Assert.IsTrue( multi is Multi ); Assert.AreEqual("extra23", multi.ExtraProp); Assert.AreEqual("newer name", multi.Name); t.Commit(); s.Close(); s = OpenSession(); t = s.BeginTransaction(); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6fee4620]] | multiId |
1 | 2 | [[#6fee4620]] | mid |
2 | 1 | [[#6fee43e0]] | simpId |
2 | 2 | [[#6fee43e0]] | sid |
3 | 1 | [[#2cdc75e0]] | smId |
3 | 2 | [[#2cdc75e0]] | smid |
4 | 1 | [[#6e08dd20]] | multi.ExtraProp += "3" |
4 | 2 | [[#6e08dd20]] | multi.ExtraProp = multi.ExtraProp + "3" |