CloneSet414


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22240.960class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12252
src/NHibernate/Collection/Generic/PersistentGenericSet.cs
231267
src/NHibernate/Collection/PersistentSet.cs
Clone Instance
1
Line Count
22
Source Line
52
Source File
src/NHibernate/Collection/Generic/PersistentGenericSet.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;
                }



Clone Instance
2
Line Count
31
Source Line
267
Source File
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)
                        {
                                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;
                }



Clone AbstractionParameter Count: 4Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#67189400]]
readList 
12[[#67189400]]
tempList 
21[[#671894e0]]
(T)element 
22[[#671894e0]]
element 
31[[#671893a0]]
T 
32[[#671893a0]]
object 
41[[#67189340]]
gset 
42[[#67189340]]
set