Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
47 | 2 | 3 | 0.989 | class_member_declarations |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 47 | 565 | src/NHibernate/Util/LinkedHashMap.cs |
2 | 47 | 636 | src/NHibernate/Util/LinkedHashMap.cs |
| ||||
protected readonly LinkedHashMap<TKey, TValue> dictionary; protected Entry current; protected readonly long version; public ForwardEnumerator(LinkedHashMap<TKey, TValue> dictionary) { this.dictionary = dictionary; version = dictionary.version; current = dictionary.header; } #region IDisposable Members public void Dispose() { } #endregion #region IEnumerator Members public bool MoveNext() { if (dictionary.version != version) throw new InvalidOperationException("Enumerator was modified"); if (current.Next == dictionary.header) return false; current = current.Next; return true; } public void Reset() { current = dictionary.header; } object IEnumerator.Current { get { return ((IEnumerator<T> )this ).Current; } } #region IEnumerator<T> Members public abstract T Current { get ; } |
| ||||
protected readonly LinkedHashMap<TKey, TValue> dictionary; private Entry current; protected readonly long version; public BackwardEnumerator(LinkedHashMap<TKey, TValue> dictionary) { this.dictionary = dictionary; version = dictionary.version; current = dictionary.header; } #region IDisposable Members public void Dispose() { } #endregion #region IEnumerator Members public bool MoveNext() { if (dictionary.version != version) throw new InvalidOperationException("Enumerator was modified"); if (current.Prev == dictionary.header) return false; current = current.Prev; return true; } public void Reset() { current = dictionary.header; } object IEnumerator.Current { get { return ((IEnumerator<T> )this ).Current; } } #region IEnumerator<T> Members public abstract T Current { get ; } |
| |||
protected readonly LinkedHashMap<TKey, TValue> dictionary; [[#variable6ad27c40]]Entry current; protected readonly long version; public [[#variable6ad27be0]](LinkedHashMap<TKey, TValue> dictionary) { this.dictionary = dictionary; version = dictionary.version; current = dictionary.header; } #region IDisposable Members public void Dispose() { } #endregion #region IEnumerator Members public bool MoveNext() { if (dictionary.version != version) throw new InvalidOperationException("Enumerator was modified"); if (current. [[#variable6ad27b40]]== dictionary.header) return false; current = current. [[#variable6ad27b40]]; return true; } public void Reset() { current = dictionary.header; } object IEnumerator.Current { get { return ((IEnumerator<T> )this ).Current; } } #region IEnumerator<T> Members public abstract T Current { get ; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6ad27c40]] | private |
1 | 2 | [[#6ad27c40]] | protected |
2 | 1 | [[#6ad27be0]] | BackwardEnumerator |
2 | 2 | [[#6ad27be0]] | ForwardEnumerator |
3 | 1 | [[#6ad27b40]] | Prev |
3 | 2 | [[#6ad27b40]] | Next |