Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
22 | 2 | 4 | 0.960 | class_member_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 22 | 52 | src/NHibernate/Collection/Generic/PersistentGenericSet.cs |
2 | 31 | 267 | src/NHibernate/Collection/PersistentSet.cs |
| ||||
public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner) { object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session); if (element != null) { readList.Add((T) element); } return element; } public override void BeginRead() { base.BeginRead(); readList = new List<T> (); } public override bool EndRead(ICollectionPersister persister) { gset.AddAll(readList); readList = null; SetInitialized(); return true; } |
| ||||
public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner) { object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session); if (element != null) { tempList.Add(element); } return element; } /// <summary> /// Set up the temporary List that will be used in the EndRead() /// to fully create the set. /// </summary> public override void BeginRead() { base.BeginRead(); tempList = new List<object> (); } /// <summary> /// Takes the contents stored in the temporary list created during <c>BeginRead()</c> /// that was populated during <c>ReadFrom()</c> and write it to the underlying /// PersistentSet. /// </summary> public override bool EndRead(ICollectionPersister persister) { set.AddAll(tempList); tempList = null; SetInitialized(); return true; } |
| |||
public override object ReadFrom(IDataReader rs, ICollectionPersister role, ICollectionAliases descriptor, object owner) { object element = role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session); if (element != null) { [[#variable67189400]].Add( [[#variable671894e0]]); } return element; } /// <summary> /// Set up the temporary List that will be used in the EndRead() /// to fully create the set. /// </summary> public override void BeginRead() { base.BeginRead(); [[#variable67189400]]= new List< [[#variable671893a0]]> (); } /// <summary> /// Takes the contents stored in the temporary list created during <c>BeginRead()</c> /// that was populated during <c>ReadFrom()</c> and write it to the underlying /// PersistentSet. /// </summary> public override bool EndRead(ICollectionPersister persister) { [[#variable67189340]].AddAll( [[#variable67189400]]); [[#variable67189400]]= null; SetInitialized(); return true; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#67189400]] | readList |
1 | 2 | [[#67189400]] | tempList |
2 | 1 | [[#671894e0]] | (T)element |
2 | 2 | [[#671894e0]] | element |
3 | 1 | [[#671893a0]] | T |
3 | 2 | [[#671893a0]] | object |
4 | 1 | [[#67189340]] | gset |
4 | 2 | [[#67189340]] | set |