CloneSet653


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21260.960class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12166
src/NHibernate/Context/CurrentSessionContext.cs
22149
src/NHibernate/Impl/CurrentSessionIdLoggingContext.cs
Clone Instance
1
Line Count
21
Source Line
66
Source File
src/NHibernate/Context/CurrentSessionContext.cs

                private static CurrentSessionContext GetCurrentSessionContext(ISessionFactory factory)
                {
                        ISessionFactoryImplementor factoryImpl = factory as ISessionFactoryImplementor;

                        if (factoryImpl == null)
                        {
                                throw new HibernateException("Session factory does not implement ISessionFactoryImplementor.");
                        }

                        if (factoryImpl.CurrentSessionContext == null)
                        {
                                throw new HibernateException("No current session context configured.");
                        }

                        CurrentSessionContext currentSessionContext = factoryImpl.CurrentSessionContext as CurrentSessionContext;
                        if (currentSessionContext == null)
                        {
                                throw new HibernateException("Current session context does not extend class CurrentSessionContext.");
                        }

                        return currentSessionContext;
                }



Clone Instance
2
Line Count
21
Source Line
49
Source File
src/NHibernate/Impl/CurrentSessionIdLoggingContext.cs

                private static CurrentSessionIdLoggingContext GetCurrentSessionIdContext(ISessionFactory factory)
                {
                        var factoryImpl = factory as ISessionFactoryImplementor;

                        if (factoryImpl == null)
                        {
                                throw new HibernateException("Session factory does not implement ISessionFactoryImplementor.");
                        }

                        if (factoryImpl.CurrentSessionContext == null)
                        {
                                throw new HibernateException("No current sessionID context configured.");
                        }

                        var currentSessionContext = factoryImpl.CurrentSessionContext as CurrentSessionIdLoggingContext;
                        if (currentSessionContext == null)
                        {
                                throw new HibernateException("Current session context does not extend class CurrentSessionIdLoggingContext.");
                        }

                        return currentSessionContext;
                }



Clone AbstractionParameter Count: 6Parameter Bindings

private static [[#variable6f59f060]] [[#variable6f59f000]](ISessionFactory factory)
{
    [[#variable6f59ef80]]factoryImpl = factory as ISessionFactoryImplementor;
   if (factoryImpl == null)
   {
      throw new HibernateException("Session factory does not implement ISessionFactoryImplementor.");
   }
   if (factoryImpl.CurrentSessionContext == null)
   {
      throw new HibernateException( [[#variable6f59eec0]]);
   }
    [[#variable6f59ee40]]currentSessionContext = factoryImpl.CurrentSessionContext as [[#variable6f59f060]];
   if (currentSessionContext == null)
   {
      throw new HibernateException( [[#variable6f59ede0]]);
   }
   return currentSessionContext;
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6f59f060]]
CurrentSessionIdLoggingContext 
12[[#6f59f060]]
CurrentSessionContext 
21[[#6f59f000]]
GetCurrentSessionIdContext 
22[[#6f59f000]]
GetCurrentSessionContext 
31[[#6f59ef80]]
var 
32[[#6f59ef80]]
ISessionFactoryImplementor 
41[[#6f59eec0]]
"No current sessionID context configured." 
42[[#6f59eec0]]
"No current session context configured." 
51[[#6f59ee40]]
var 
52[[#6f59ee40]]
CurrentSessionContext 
61[[#6f59ede0]]
"Current session context does not extend class CurrentSessionIdLoggingContext." 
62[[#6f59ede0]]
"Current session context does not extend class CurrentSessionContext."