Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
40 | 3 | 1 | 0.998 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 40 | 1 | src/NHibernate.ByteCode.Castle.Tests/TestConfigurationHelper.cs |
2 | 40 | 1 | src/NHibernate.ByteCode.LinFu.Tests/TestConfigurationHelper.cs |
3 | 40 | 1 | src/NHibernate.ByteCode.Spring.Tests/TestConfigurationHelper.cs |
| ||||
using System; using System.IO; using NHibernate.Cfg; namespace NHibernate.ByteCode.Castle.Tests { public static class TestConfigurationHelper { public static readonly string hibernateConfigFile; static TestConfigurationHelper() { // Verify if hibernate.cfg.xml exists hibernateConfigFile = GetDefaultConfigurationFilePath(); } public static string GetDefaultConfigurationFilePath() { string baseDir = AppDomain.CurrentDomain.BaseDirectory; string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; string binPath = relativeSearchPath == null ? baseDir: Path.Combine(baseDir, relativeSearchPath); string fullPath = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); return File.Exists(fullPath) ? fullPath: null; } /// <summary> /// Standar Configuration for tests. /// </summary> /// <returns>The configuration using merge between App.Config and hibernate.cfg.xml if present.</returns> public static Configuration GetDefaultConfiguration() { var result = new Configuration(); if (hibernateConfigFile != null) { result.Configure(hibernateConfigFile); } return result; } } } |
| ||||
using System; using System.IO; using NHibernate.Cfg; namespace NHibernate.ByteCode.LinFu.Tests { public static class TestConfigurationHelper { public static readonly string hibernateConfigFile; static TestConfigurationHelper() { // Verify if hibernate.cfg.xml exists hibernateConfigFile = GetDefaultConfigurationFilePath(); } public static string GetDefaultConfigurationFilePath() { string baseDir = AppDomain.CurrentDomain.BaseDirectory; string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; string binPath = relativeSearchPath == null ? baseDir: Path.Combine(baseDir, relativeSearchPath); string fullPath = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); return File.Exists(fullPath) ? fullPath: null; } /// <summary> /// Standar Configuration for tests. /// </summary> /// <returns>The configuration using merge between App.Config and hibernate.cfg.xml if present.</returns> public static Configuration GetDefaultConfiguration() { var result = new Configuration(); if (hibernateConfigFile != null) { result.Configure(hibernateConfigFile); } return result; } } } |
| ||||
using System; using System.IO; using NHibernate.Cfg; namespace NHibernate.ByteCode.Spring.Tests { public static class TestConfigurationHelper { public static readonly string hibernateConfigFile; static TestConfigurationHelper() { // Verify if hibernate.cfg.xml exists hibernateConfigFile = GetDefaultConfigurationFilePath(); } public static string GetDefaultConfigurationFilePath() { string baseDir = AppDomain.CurrentDomain.BaseDirectory; string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; string binPath = relativeSearchPath == null ? baseDir: Path.Combine(baseDir, relativeSearchPath); string fullPath = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); return File.Exists(fullPath) ? fullPath: null; } /// <summary> /// Standard Configuration for tests. /// </summary> /// <returns>The configuration using merge between App.Config and hibernate.cfg.xml if present.</returns> public static Configuration GetDefaultConfiguration() { var result = new Configuration(); if (hibernateConfigFile != null) { result.Configure(hibernateConfigFile); } return result; } } } |
| |||
using System; using System.IO; using NHibernate.Cfg; namespace NHibernate.ByteCode. [[#variable65269ae0]].Tests { public static class TestConfigurationHelper { public static readonly string hibernateConfigFile; static TestConfigurationHelper() { // Verify if hibernate.cfg.xml exists hibernateConfigFile = GetDefaultConfigurationFilePath(); } public static string GetDefaultConfigurationFilePath() { string baseDir = AppDomain.CurrentDomain.BaseDirectory; string relativeSearchPath = AppDomain.CurrentDomain.RelativeSearchPath; string binPath = relativeSearchPath == null ? baseDir: Path.Combine(baseDir, relativeSearchPath); string fullPath = Path.Combine(binPath, Configuration.DefaultHibernateCfgFileName); return File.Exists(fullPath) ? fullPath: null; } /// <summary> /// Standar Configuration for tests. /// Standard Configuration for tests. /// </summary> /// <returns>The configuration using merge between App.Config and hibernate.cfg.xml if present.</returns> public static Configuration GetDefaultConfiguration() { var result = new Configuration(); if (hibernateConfigFile != null) { result.Configure(hibernateConfigFile); } return result; } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#65269ae0]] | Castle |
1 | 2 | [[#65269ae0]] | LinFu |
1 | 3 | [[#65269ae0]] | Spring |