Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
28 | 4 | 3 | 0.991 | statement_list[9] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 28 | 37 | src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs |
2 | 26 | 73 | src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs |
3 | 32 | 106 | src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs |
4 | 27 | 144 | src/NHibernate.Test/NHSpecificTest/NH1487/Fixture.cs |
| ||||
if ( !(Dialect.Dialect.GetDialect() is MsSql2000Dialect)) { Assert.Ignore("Specific for MsSql2000Dialect"); } const string hbm = @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A' unique-key='AC'/> <property name='B' unique-key='BC'/> <property name='C' unique-key='AC, BC'/> </class> </hibernate-mapping>" ; var cfg = GetConf(); cfg.AddXmlString(hbm); // Can create the schema var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); Assert.That(script, Text.Contains("unique (A, C)")); Assert.That(script, Text.Contains("unique (B, C)")); |
| ||||
if ( !(Dialect.Dialect.GetDialect() is MsSql2000Dialect)) { Assert.Ignore("Specific for MsSql2000Dialect"); } const string hbm = @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A' index='AC'/> <property name='B' index='BC'/> <property name='C' index='AC, BC'/> </class> </hibernate-mapping>" ; var cfg = GetConf(); cfg.AddXmlString(hbm); var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); Assert.That(script, Text.Contains("create index AC on Entity (A, C)")); Assert.That(script, Text.Contains("create index BC on Entity (B, C)")); |
| ||||
if ( !(Dialect.Dialect.GetDialect() is MsSql2000Dialect)) { Assert.Ignore("Specific for MsSql2000Dialect"); } const string hbm = @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A'> <column name='A' index='AC'/> </property> <property name='B'> <column name='B' index='BC'/> </property> <property name='C'> <column name='C' index='AC,BC'/> </property> </class> </hibernate-mapping>" ; var cfg = GetConf(); cfg.AddXmlString(hbm); var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); Assert.That(script, Text.Contains("create index AC on Entity (A, C)")); Assert.That(script, Text.Contains("create index BC on Entity (B, C)")); |
| ||||
if ( !(Dialect.Dialect.GetDialect() is MsSql2000Dialect)) { Assert.Ignore("Specific for MsSql2000Dialect"); } const string hbm = @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <column name='Id' index='IdxId1,IdxId2'/> <generator class='assigned' /> </id> <property name='A'/> <property name='B'/> <property name='C'/> </class> </hibernate-mapping>" ; var cfg = GetConf(); cfg.AddXmlString(hbm); var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); Assert.That(script, Text.Contains("create index IdxId1 on Entity (Id)")); Assert.That(script, Text.Contains("create index IdxId2 on Entity (Id)")); |
| |||
if ( !(Dialect.Dialect.GetDialect() is MsSql2000Dialect)) { Assert.Ignore("Specific for MsSql2000Dialect"); } const string hbm = [[#variable65269e00]]; var cfg = GetConf(); cfg.AddXmlString(hbm); // Can create the schema var scriptB = new StringBuilder(); new SchemaExport(cfg).Create(sl => scriptB.Append(sl), true); var script = scriptB.ToString(); Assert.That(script, Text.Contains( [[#variable687f9aa0]])); Assert.That(script, Text.Contains( [[#variable70b27180]])); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#65269e00]] | @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A' unique-key='AC'/> <property name='B' unique-key='BC'/> <property name='C' unique-key='AC, BC'/> </class> </hibernate-mapping>" |
1 | 2 | [[#65269e00]] | @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A' index='AC'/> <property name='B' index='BC'/> <property name='C' index='AC, BC'/> </class> </hibernate-mapping>" |
1 | 3 | [[#65269e00]] | @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <generator class='assigned' /> </id> <property name='A'> <column name='A' index='AC'/> </property> <property name='B'> <column name='B' index='BC'/> </property> <property name='C'> <column name='C' index='AC,BC'/> </property> </class> </hibernate-mapping>" |
1 | 4 | [[#65269e00]] | @"<?xml version='1.0' encoding='utf-8' ?> <hibernate-mapping xmlns='urn:nhibernate-mapping-2.2' namespace='NHibernate.Test.NHSpecificTest.NH1487' assembly='NHibernate.Test'> <class name='Entity' > <id name='Id' > <column name='Id' index='IdxId1,IdxId2'/> <generator class='assigned' /> </id> <property name='A'/> <property name='B'/> <property name='C'/> </class> </hibernate-mapping>" |
2 | 1 | [[#687f9aa0]] | "unique (A, C)" |
2 | 2 | [[#687f9aa0]] | "create index AC on Entity (A, C)" |
2 | 3 | [[#687f9aa0]] | "create index AC on Entity (A, C)" |
2 | 4 | [[#687f9aa0]] | "create index IdxId1 on Entity (Id)" |
3 | 1 | [[#70b27180]] | "unique (B, C)" |
3 | 2 | [[#70b27180]] | "create index BC on Entity (B, C)" |
3 | 3 | [[#70b27180]] | "create index BC on Entity (B, C)" |
3 | 4 | [[#70b27180]] | "create index IdxId2 on Entity (Id)" |