Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
25 | 2 | 3 | 0.990 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 25 | 20 | src/NHibernate.Test/NHSpecificTest/NH1959/Fixture.cs |
2 | 25 | 47 | src/NHibernate.Test/NHSpecificTest/NH1959/Fixture.cs |
| ||||
[Test] public void StartWithEmptyDoAddAndRemove() { ClassB b = new ClassB(); ClassA a = new ClassA(); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.Save(a); s.Save(b); tx.Commit(); } using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { ClassA loadedA = s.Get < ClassA > (a.Id); ClassB loadedB = s.Get < ClassB > (b.Id); loadedA.TheBag.Add(loadedB); loadedA.TheBag.Remove(loadedB); tx.Commit(); } using (ISession s = OpenSession()) Assert.AreEqual(0, s.Get < ClassA > (a.Id).TheBag.Count); } |
| ||||
[Test] public void StartWithEmptyDoAddAndRemoveAt() { ClassB b = new ClassB(); ClassA a = new ClassA(); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.Save(a); s.Save(b); tx.Commit(); } using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { ClassA loadedA = s.Get < ClassA > (a.Id); ClassB loadedB = s.Get < ClassB > (b.Id); loadedA.TheBag.Add(loadedB); loadedA.TheBag.RemoveAt(0); tx.Commit(); } using (ISession s = OpenSession()) Assert.AreEqual(0, s.Get < ClassA > (a.Id).TheBag.Count); } |
| |||
[Test] public void [[#variable298677a0]]() { ClassB b = new ClassB(); ClassA a = new ClassA(); using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { s.Save(a); s.Save(b); tx.Commit(); } using (ISession s = OpenSession()) using (ITransaction tx = s.BeginTransaction()) { ClassA loadedA = s.Get < ClassA > (a.Id); ClassB loadedB = s.Get < ClassB > (b.Id); loadedA.TheBag.Add(loadedB); loadedA.TheBag. [[#variable298676e0]]( [[#variable29867660]]); tx.Commit(); } using (ISession s = OpenSession()) Assert.AreEqual(0, s.Get < ClassA > (a.Id).TheBag.Count); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#298677a0]] | StartWithEmptyDoAddAndRemove |
1 | 2 | [[#298677a0]] | StartWithEmptyDoAddAndRemoveAt |
2 | 1 | [[#298676e0]] | Remove |
2 | 2 | [[#298676e0]] | RemoveAt |
3 | 1 | [[#29867660]] | loadedB |
3 | 2 | [[#29867660]] | 0 |