CloneSet989


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47230.961class_member_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
147563
src/NHibernate/AdoNet/AbstractBatcher.cs
244144
src/NHibernate/Driver/NHybridDataReader.cs
Clone Instance
1
Line Count
47
Source Line
563
Source File
src/NHibernate/AdoNet/AbstractBatcher.cs

                /// <summary>
                /// Finalizer that ensures the object is correctly disposed of.
                /// </summary>
                ~AbstractBatcher()
                {
                        // Don't log in the finalizer, it causes problems
                        // if the output stream is finalized before the batcher.
                        //log.Debug( "running BatcherImpl.Dispose(false)" );
                        Dispose(false);
                }

                /// <summary>
                /// Takes care of freeing the managed and unmanaged resources that 
                /// this class is responsible for.
                /// </summary>
                public void Dispose()
                {
                        log.Debug("running BatcherImpl.Dispose(true)");
                        Dispose(true);
                }

                /// <summary>
                /// Takes care of freeing the managed and unmanaged resources that 
                /// this class is responsible for.
                /// </summary>
                /// <param name="isDisposing">Indicates if this BatcherImpl is being Disposed of or Finalized.</param>
                /// <remarks>
                /// If this BatcherImpl is being Finalized (<c>isDisposing==false</c>) then make sure not
                /// to call any methods that could potentially bring this BatcherImpl back to life.
                /// </remarks>
                protected virtual void Dispose(bool isDisposing)
                {
                        if (_isAlreadyDisposed)
                        {
                                // don't dispose of multiple times.
                                return;
                        }

                        // free managed resources that are being managed by the AdoTransaction if we
                        // know this call came through Dispose()
                        if (isDisposing)
                        {
                                CloseCommands();
                        }

                        // free unmanaged resources here

                        _isAlreadyDisposed = true;
                        // nothing for Finalizer to do - so tell the GC to ignore it
                        GC.SuppressFinalize(this );
                }



Clone Instance
2
Line Count
44
Source Line
144
Source File
src/NHibernate/Driver/NHybridDataReader.cs

                /// <summary>
                /// Finalizer that ensures the object is correctly disposed of.
                /// </summary>
                ~NHybridDataReader()
                {
                        Dispose(false);
                }

                /// <summary>
                /// Takes care of freeing the managed and unmanaged resources that 
                /// this class is responsible for.
                /// </summary>
                public void Dispose()
                {
                        log.Debug("running NHybridDataReader.Dispose()");
                        Dispose(true);
                }

                /// <summary>
                /// Takes care of freeing the managed and unmanaged resources that 
                /// this class is responsible for.
                /// </summary>
                /// <param name="isDisposing">Indicates if this NHybridDataReader is being Disposed of or Finalized.</param>
                /// <remarks>
                /// If this NHybridDataReader is being Finalized (<c>isDisposing==false</c>) then make sure not
                /// to call any methods that could potentially bring this NHybridDataReader back to life.
                /// </remarks>
                protected virtual void Dispose(bool isDisposing)
                {
                        if (_isAlreadyDisposed)
                        {
                                // don't dispose of multiple times.
                                return;
                        }

                        // free managed resources that are being managed by the NHybridDataReader if we
                        // know this call came through Dispose()
                        if (isDisposing)
                        {
                                _reader.Dispose();
                        }

                        // free unmanaged resources here

                        _isAlreadyDisposed = true;
                        // nothing for Finalizer to do - so tell the GC to ignore it
                        GC.SuppressFinalize(this );
                }



Clone AbstractionParameter Count: 3Parameter Bindings

/// <summary>
/// Finalizer that ensures the object is correctly disposed of.
/// </summary>
~ [[#variable573e3b20]]()
{
   // Don't log in the finalizer, it causes problems
   // if the output stream is finalized before the batcher.
   //log.Debug( "running BatcherImpl.Dispose(false)" );
   Dispose(false);
}

/// <summary>
/// Takes care of freeing the managed and unmanaged resources that 
/// this class is responsible for.
/// </summary>
public void Dispose()
{
   log.Debug( [[#variable54b1eea0]]);
   Dispose(true);
}

/// <summary>
/// Takes care of freeing the managed and unmanaged resources that 
/// this class is responsible for.
/// </summary>
/// <param name="isDisposing">Indicates if this BatcherImpl is being Disposed of or Finalized.</param>
/// <param name="isDisposing">Indicates if this NHybridDataReader is being Disposed of or Finalized.</param>
/// <remarks>
/// If this BatcherImpl is being Finalized (<c>isDisposing==false</c>) then make sure not
/// to call any methods that could potentially bring this BatcherImpl back to life.
/// If this NHybridDataReader is being Finalized (<c>isDisposing==false</c>) then make sure not
/// to call any methods that could potentially bring this NHybridDataReader back to life.
/// </remarks>
protected virtual void Dispose(bool isDisposing)
{
   if (_isAlreadyDisposed)
   {
      // don't dispose of multiple times.
      return;
   }
   // free managed resources that are being managed by the AdoTransaction if we
   // free managed resources that are being managed by the NHybridDataReader if we
   // know this call came through Dispose()
   if (isDisposing)
   {
       [[#variable5e425b80]]();
   }
   // free unmanaged resources here
   _isAlreadyDisposed = true;
   // nothing for Finalizer to do - so tell the GC to ignore it
   GC.SuppressFinalize(this );
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#573e3b20]]
AbstractBatcher 
12[[#573e3b20]]
NHybridDataReader 
21[[#54b1eea0]]
"running BatcherImpl.Dispose(true)" 
22[[#54b1eea0]]
"running NHybridDataReader.Dispose()" 
31[[#5e425b80]]
CloseCommands 
32[[#5e425b80]]
_reader.Dispose