CloneSet134


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
37220.997class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
137911
src/NHibernate/Type/TypeFactory.cs
237956
src/NHibernate/Type/TypeFactory.cs
Clone Instance
1
Line Count
37
Source Line
911
Source File
src/NHibernate/Type/TypeFactory.cs

                /// <summary>
                /// Determine if any of the given field values are dirty,
                /// returning an array containing indexes of
                /// the dirty fields or null if no fields are dirty.
                /// </summary>
                public static int[] FindDirty(
                        StandardProperty[] properties,
                        object[] x,
                        object[] y,
                        bool[][] includeColumns,
                        bool anyUninitializedProperties,
                        ISessionImplementor session)
                {
                        int[] results = null;
                        int count = 0;
                        int span = properties.Length;

                        for (int i = 0; i < span; i++)
                        {
                                bool dirty =
                                        // TODO H3: x[ i ] != LazyPropertyInitializer.UnfetchedProperty && //x is the "current" state
                                        properties[i].IsDirtyCheckable(anyUninitializedProperties) &&
                                           properties[i].Type.IsDirty(y[i], x[i], includeColumns[i], session);

                                if (dirty)
                                {
                                        if (results == null)
                                        {
                                                results = new int[span];
                                        }
                                        results[count++] = i;
                                }
                        }
                        if (count == 0)
                        {
                                return null;
                        }
                        else
                        {
                                int[] trimmed = new int[count];
                                System.Array.Copy(results, 0, trimmed, 0, count);
                                return trimmed;
                        }
                }



Clone Instance
2
Line Count
37
Source Line
956
Source File
src/NHibernate/Type/TypeFactory.cs

                /// <summary>
                /// Determine if any of the given field values are modified,
                /// returning an array containing indexes of
                /// the dirty fields or null if no fields are modified.
                /// </summary>
                public static int[] FindModified(
                        StandardProperty[] properties,
                        object[] x,
                        object[] y,
                        bool[][] includeColumns,
                        bool anyUninitializedProperties,
                        ISessionImplementor session)
                {
                        int[] results = null;
                        int count = 0;
                        int span = properties.Length;

                        for (int i = 0; i < span; i++)
                        {
                                bool dirty =
                                        // TODO H3: x[ i ] != LazyPropertyInitializer.UnfetchedProperty && //x is the "current" state
                                        properties[i].IsDirtyCheckable(anyUninitializedProperties) &&
                                           properties[i].Type.IsModified(y[i], x[i], includeColumns[i], session);

                                if (dirty)
                                {
                                        if (results == null)
                                        {
                                                results = new int[span];
                                        }
                                        results[count++] = i;
                                }
                        }
                        if (count == 0)
                        {
                                return null;
                        }
                        else
                        {
                                int[] trimmed = new int[count];
                                System.Array.Copy(results, 0, trimmed, 0, count);
                                return trimmed;
                        }
                }



Clone AbstractionParameter Count: 2Parameter Bindings

/// <summary>
/// Determine if any of the given field values are modified,
/// Determine if any of the given field values are dirty,
/// returning an array containing indexes of
/// the dirty fields or null if no fields are modified.
/// the dirty fields or null if no fields are dirty.
/// </summary>
public static int[] [[#variable57d09a20]](StandardProperty[] properties, object[] x, object[] y, bool[][] includeColumns, bool anyUninitializedProperties, ISessionImplementor session)
{
   int[] results = null;
   int count = 0;
   int span = properties.Length;
   for (int i = 0; i < span; i++)
   {
      bool dirty =
                  // TODO H3: x[ i ] != LazyPropertyInitializer.UnfetchedProperty && //x is the "current" state
                  properties[i].IsDirtyCheckable(anyUninitializedProperties) && properties[i].Type. [[#variable57d09980]](y[i], x[i], includeColumns[i], session);
      if (dirty)
      {
         if (results == null)
         {
            results = new int[span];
         }
         results[count++] = i;
      }
   }
   if (count == 0)
   {
      return null;
   }
   else
   {
      int[] trimmed = new int[count];
      System.Array.Copy(results, 0, trimmed, 0, count);
      return trimmed;
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#57d09a20]]
FindModified 
12[[#57d09a20]]
FindDirty 
21[[#57d09980]]
IsModified 
22[[#57d09980]]
IsDirty