CloneSet192


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26210.986statement_list[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
126449
src/NHibernate/Impl/AbstractDetachedQuery.cs
226548
src/NHibernate/Impl/AbstractDetachedQuery.cs
Clone Instance
1
Line Count
26
Source Line
449
Source File
src/NHibernate/Impl/AbstractDetachedQuery.cs

                        // Even if the probably that somebody use a mixed technique to set parameters 
                        // (from POCO using SetProperties and using named parameter setters) here is a possible
                        // difference between IQuery and DetachedQuery behaviour.
                        // In IQuery we don't know who override a param value; in DetachedQuery the direct use of 
                        // a named parameter setter override the param value set by SetProperties(POCO)
                        foreach (object obj in optionalUntypeParams)
                                q.SetProperties(obj);

                        // Set untyped positional parameters
                        foreach (KeyValuePair<int, object> pup in posUntypeParams)
                                q.SetParameter(pup.Key, pup.Value);

                        // Set untyped named parameters
                        foreach (KeyValuePair<string, object> nup in namedUntypeParams)
                                q.SetParameter(nup.Key, nup.Value);

                        // Set untyped named parameters list
                        foreach (KeyValuePair<string, ICollection> nulp in namedUntypeListParams)
                                q.SetParameterList(nulp.Key, nulp.Value);

                        // Set typed positional parameters
                        foreach (KeyValuePair<int, TypedValue> pp in posParams)
                                q.SetParameter(pp.Key, pp.Value.Value, pp.Value.Type);

                        // Set typed named parameters
                        foreach (KeyValuePair<string, TypedValue> np in namedParams)
                                q.SetParameter(np.Key, np.Value.Value, np.Value.Type);

                        // Set typed named parameters List
                        foreach (KeyValuePair<string, TypedValue> nlp in namedListParams)
                                q.SetParameterList(nlp.Key, (ICollection)nlp.Value.Value, nlp.Value.Type);


Clone Instance
2
Line Count
26
Source Line
548
Source File
src/NHibernate/Impl/AbstractDetachedQuery.cs

                        foreach (object obj in optionalUntypeParams)
                                destination.SetProperties(obj);

                        // Set untyped positional parameters
                        foreach (KeyValuePair<int, object> pup in posUntypeParams)
                                destination.SetParameter(pup.Key, pup.Value);

                        // Set untyped named parameters
                        foreach (KeyValuePair<string, object> nup in namedUntypeParams)
                                destination.SetParameter(nup.Key, nup.Value);

                        // Set untyped named parameters list
                        foreach (KeyValuePair<string, ICollection> nulp in namedUntypeListParams)
                                destination.SetParameterList(nulp.Key, nulp.Value);

                        // Set typed positional parameters
                        foreach (KeyValuePair<int, TypedValue> pp in posParams)
                                destination.SetParameter(pp.Key, pp.Value.Value, pp.Value.Type);

                        // Set typed named parameters
                        foreach (KeyValuePair<string, TypedValue> np in namedParams)
                                destination.SetParameter(np.Key, np.Value.Value, np.Value.Type);

                        // Set typed named parameters List
                        foreach (KeyValuePair<string, TypedValue> nlp in namedListParams)
                                destination.SetParameterList(nlp.Key, (ICollection)nlp.Value.Value, nlp.Value.Type);


Clone AbstractionParameter Count: 1Parameter Bindings

// Even if the probably that somebody use a mixed technique to set parameters 
// (from POCO using SetProperties and using named parameter setters) here is a possible
// difference between IQuery and DetachedQuery behaviour.
// In IQuery we don't know who override a param value; in DetachedQuery the direct use of 
// a named parameter setter override the param value set by SetProperties(POCO)
foreach (object obj in optionalUntypeParams)
    [[#variable2a3a0cc0]].SetProperties(obj);
// Set untyped positional parameters
foreach (KeyValuePair<int, object> pup in posUntypeParams)
    [[#variable2a3a0cc0]].SetParameter(pup.Key, pup.Value);
// Set untyped named parameters
foreach (KeyValuePair<string, object> nup in namedUntypeParams)
    [[#variable2a3a0cc0]].SetParameter(nup.Key, nup.Value);
// Set untyped named parameters list
foreach (KeyValuePair<string, ICollection> nulp in namedUntypeListParams)
    [[#variable2a3a0cc0]].SetParameterList(nulp.Key, nulp.Value);
// Set typed positional parameters
foreach (KeyValuePair<int, TypedValue> pp in posParams)
    [[#variable2a3a0cc0]].SetParameter(pp.Key, pp.Value.Value, pp.Value.Type);
// Set typed named parameters
foreach (KeyValuePair<string, TypedValue> np in namedParams)
    [[#variable2a3a0cc0]].SetParameter(np.Key, np.Value.Value, np.Value.Type);
// Set typed named parameters List
foreach (KeyValuePair<string, TypedValue> nlp in namedListParams)
    [[#variable2a3a0cc0]].SetParameterList(nlp.Key, (ICollection)nlp.Value.Value, nlp.Value.Type);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2a3a0cc0]]
q 
12[[#2a3a0cc0]]
destination