Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
37 | 2 | 2 | 0.997 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 37 | 911 | src/NHibernate/Type/TypeFactory.cs |
2 | 37 | 956 | 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; } } |
| ||||
/// <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; } } |
| |||
/// <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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#57d09a20]] | FindModified |
1 | 2 | [[#57d09a20]] | FindDirty |
2 | 1 | [[#57d09980]] | IsModified |
2 | 2 | [[#57d09980]] | IsDirty |