Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
12 | 3 | 6 | 0.962 | non_pp_embedded_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 151 | src/Iesi.Collections.Test/Generic/SetFixture.cs |
2 | 12 | 318 | src/Iesi.Collections.Test/Generic/SetFixture.cs |
3 | 13 | 340 | src/Iesi.Collections.Test/Generic/SetFixture.cs |
| ||||
try { Assert.IsTrue(_set.AddAll(addAll), "should have modified set"); Assert.AreEqual(5, _set.Count, "should have added one 'four' and 'five'"); Assert.IsFalse(_set.AddAll(addAll), "all elements already in set"); if (_set.IsReadOnly) Assert.Fail("Read-only set can be modified"); } catch (NotSupportedException) { if ( !_set.IsReadOnly) throw; } |
| ||||
try { Assert.IsTrue(_set.RemoveAll(all), "should have removed an element"); Assert.AreEqual(2, _set.Count, "should be down to 2 elements."); Assert.IsFalse(_set.RemoveAll(all), "all of the elements already removed so set not modified."); if (_set.IsReadOnly) Assert.Fail("Read-only set can be modified"); } catch (NotSupportedException) { if ( !_set.IsReadOnly) throw; } |
| ||||
try { Assert.IsTrue(_set.RetainAll(retain), "set was modified"); Assert.AreEqual(1, _set.Count, "only 1 element retained"); Assert.IsFalse(_set.RetainAll(retain), "set was not modified"); if (_set.IsReadOnly) Assert.Fail("Read-only set can be modified"); } catch (NotSupportedException) { if ( !_set.IsReadOnly) throw; } |
| |||
try { Assert.IsTrue(_set. [[#variable6ab08a80]]( [[#variable6ab089c0]]), [[#variable6ab08960]]); Assert.AreEqual( [[#variable6ab08900]], _set.Count, [[#variable6ab08880]]); Assert.IsFalse(_set. [[#variable6ab08a80]]( [[#variable6ab089c0]]), [[#variable6ab087c0]]); if (_set.IsReadOnly) Assert.Fail("Read-only set can be modified"); } catch (NotSupportedException) { if ( !_set.IsReadOnly) throw; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6ab08a80]] | RemoveAll |
1 | 2 | [[#6ab08a80]] | AddAll |
1 | 3 | [[#6ab08a80]] | RetainAll |
2 | 1 | [[#6ab089c0]] | all |
2 | 2 | [[#6ab089c0]] | addAll |
2 | 3 | [[#6ab089c0]] | retain |
3 | 1 | [[#6ab08960]] | "should have removed an element" |
3 | 2 | [[#6ab08960]] | "should have modified set" |
3 | 3 | [[#6ab08960]] | "set was modified" |
4 | 1 | [[#6ab08900]] | 2 |
4 | 2 | [[#6ab08900]] | 5 |
4 | 3 | [[#6ab08900]] | 1 |
5 | 1 | [[#6ab08880]] | "should be down to 2 elements." |
5 | 2 | [[#6ab08880]] | "should have added one 'four' and 'five'" |
5 | 3 | [[#6ab08880]] | "only 1 element retained" |
6 | 1 | [[#6ab087c0]] | "all of the elements already removed so set not modified." |
6 | 2 | [[#6ab087c0]] | "all elements already in set" |
6 | 3 | [[#6ab087c0]] | "set was not modified" |