Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
21 | 2 | 6 | 0.960 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 21 | 66 | src/NHibernate/Context/CurrentSessionContext.cs |
2 | 21 | 49 | src/NHibernate/Impl/CurrentSessionIdLoggingContext.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; } |
| ||||
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; } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6f59f060]] | CurrentSessionIdLoggingContext |
1 | 2 | [[#6f59f060]] | CurrentSessionContext |
2 | 1 | [[#6f59f000]] | GetCurrentSessionIdContext |
2 | 2 | [[#6f59f000]] | GetCurrentSessionContext |
3 | 1 | [[#6f59ef80]] | var |
3 | 2 | [[#6f59ef80]] | ISessionFactoryImplementor |
4 | 1 | [[#6f59eec0]] | "No current sessionID context configured." |
4 | 2 | [[#6f59eec0]] | "No current session context configured." |
5 | 1 | [[#6f59ee40]] | var |
5 | 2 | [[#6f59ee40]] | CurrentSessionContext |
6 | 1 | [[#6f59ede0]] | "Current session context does not extend class CurrentSessionIdLoggingContext." |
6 | 2 | [[#6f59ede0]] | "Current session context does not extend class CurrentSessionContext." |