Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
18 | 2 | 3 | 0.988 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 13 | src/NHibernate.Test/UtilityTest/SafetyEnumerableFixture.cs |
2 | 18 | 52 | src/NHibernate.Test/UtilityTest/SafetyEnumerableFixture.cs |
| ||||
[Test] public void MixedCollection() { IList<IAType> l = new List<IAType> (); l.Add(new AClass()); l.Add(new BClass()); l.Add(new AClass()); l.Add(new BClass()); l.Add(new AClass()); IEnumerable<AClass> eAClass = new SafetyEnumerable<AClass> (l); int i = 0; foreach (IAType aClass in eAClass) ++i; Assert.AreEqual(3, i); IEnumerable<BClass> eBClass = new SafetyEnumerable<BClass> (l); i = 0; foreach (IAType aClass in eBClass) ++i; Assert.AreEqual(2, i); } |
| ||||
[Test] public void MixedWithNulls() { IList<IAType> l = new List<IAType> (); l.Add(new AClass()); l.Add(null); l.Add(new AClass()); l.Add(new BClass()); l.Add(new AClass()); IEnumerable<AClass> eAClass = new SafetyEnumerable<AClass> (l); int i = 0; foreach (IAType aClass in eAClass) ++i; Assert.AreEqual(4, i); IEnumerable<BClass> eBClass = new SafetyEnumerable<BClass> (l); i = 0; foreach (IAType aClass in eBClass) ++i; Assert.AreEqual(2, i); } |
| |||
[Test] public void [[#variable46dec9c0]]() { IList<IAType> l = new List<IAType> (); l.Add(new AClass()); l.Add( [[#variable657d4580]]); l.Add(new AClass()); l.Add(new BClass()); l.Add(new AClass()); IEnumerable<AClass> eAClass = new SafetyEnumerable<AClass> (l); int i = 0; foreach (IAType aClass in eAClass) ++i; Assert.AreEqual( [[#variable657d4500]], i); IEnumerable<BClass> eBClass = new SafetyEnumerable<BClass> (l); i = 0; foreach (IAType aClass in eBClass) ++i; Assert.AreEqual(2, i); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#46dec9c0]] | MixedCollection |
1 | 2 | [[#46dec9c0]] | MixedWithNulls |
2 | 1 | [[#657d4580]] | new BClass() |
2 | 2 | [[#657d4580]] | null |
3 | 1 | [[#657d4500]] | 3 |
3 | 2 | [[#657d4500]] | 4 |