CloneSet559


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40250.954class_member_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
13914
src/NHibernate/Engine/IdentifierValue.cs
24016
src/NHibernate/Engine/VersionValue.cs
Clone Instance
1
Line Count
39
Source Line
14
Source File
src/NHibernate/Engine/IdentifierValue.cs

                private readonly object value;

                /// <summary></summary>
                protected IdentifierValue()
                {
                        value = null;
                }

                /// <summary>
                /// Assume the transient instance is newly instantiated if its identifier is null or
                /// equal to <c>Value</c>
                /// </summary>
                /// <param name="value"></param>
                public IdentifierValue(object value)
                {
                        this.value = value;
                }

                /// <summary>
                /// Does the given identifier belong to a new instance
                /// </summary>
                public virtual bool ? IsUnsaved(object id)
                {
                        if (log.IsDebugEnabled)
                        {
                                log.Debug("unsaved-value: " + value);
                        }
                        return id == null || id.Equals(value);
                }

                public virtual object GetDefaultValue(object currentValue)
                {
                        return value;
                }

                /// <summary>
                /// Always assume the transient instance is newly instantiated
                /// </summary>
                public static readonly IdentifierValue SaveAny = new SaveAnyClass();



Clone Instance
2
Line Count
40
Source Line
16
Source File
src/NHibernate/Engine/VersionValue.cs

                private readonly object value;

                /// <summary></summary>
                protected VersionValue()
                {
                        value = null;
                }

                /// <summary>
                /// Assume the transient instance is newly instantiated if its version is null or
                /// equal to <c>Value</c>
                /// </summary>
                /// <param name="value"></param>
                public VersionValue(object value)
                {
                        this.value = value;
                }

                /// <summary>
                /// Does the given identifier belong to a new instance
                /// </summary>
                public virtual bool ? IsUnsaved(object version)
                {
                        if (log.IsDebugEnabled)
                        {
                                log.Debug("unsaved-value: " + value);
                        }
                        return version == null || version.Equals(value);
                }

                public virtual object GetDefaultValue(object currentValue)
                {
                        return value;
                }

                /// <summary>
                /// Assume the transient instance is newly instantiated if the version
                /// is null, otherwise assume it is a detached instance.
                /// </summary>
                public static VersionValue VersionSaveNull = new VersionSaveNullClass();



Clone AbstractionParameter Count: 5Parameter Bindings

private readonly object value;

/// <summary></summary>
protected [[#variable2cd13a40]]()
{
   value = null;
}

/// <summary>
/// Assume the transient instance is newly instantiated if its version is null or
/// Assume the transient instance is newly instantiated if its identifier is null or
/// equal to <c>Value</c>
/// </summary>
/// <param name="value"></param>
public [[#variable2cd13a40]](object value)
{
   this.value = value;
}

/// <summary>
/// Does the given identifier belong to a new instance
/// </summary>
public virtual bool ? IsUnsaved(object [[#variable67af85e0]])
{
   if (log.IsDebugEnabled)
   {
      log.Debug("unsaved-value: " + value);
   }
   return [[#variable67af85e0]]== null || [[#variable67af85e0]].Equals(value);
}

public virtual object GetDefaultValue(object currentValue)
{
   return value;
}

 [[#variable2cd138e0]] [[#variable2cd13a40]] [[#variable2cd137c0]]= new [[#variable2cd133a0]]();

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#2cd13a40]]
VersionValue 
12[[#2cd13a40]]
IdentifierValue 
21[[#67af85e0]]
version 
22[[#67af85e0]]
id 
31[[#2cd138e0]]
/// <summary>
/// Assume the transient instance is newly instantiated if the version
/// is null, otherwise assume it is a detached instance.
/// </summary>
public static 
32[[#2cd138e0]]
/// <summary>
/// Always assume the transient instance is newly instantiated
/// </summary>
public static readonly 
41[[#2cd137c0]]
VersionSaveNull 
42[[#2cd137c0]]
SaveAny 
51[[#2cd133a0]]
VersionSaveNullClass 
52[[#2cd133a0]]
SaveAnyClass