Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
84 | 3 | 6 | 0.990 | namespace_member_declarations[4] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 84 | 22 | src/NHibernate/Dialect/Schema/FirebirdMetaData.cs |
2 | 81 | 17 | src/NHibernate/Dialect/Schema/MsSqlMetaData.cs |
3 | 85 | 24 | src/NHibernate/Dialect/Schema/MySQLMetaData.cs |
| ||||
public class FirebirdTableMetadata : AbstractTableMetadata { public FirebirdTableMetadata(DataRow rs, IDataBaseSchema meta, bool extras) : base(rs, meta, extras) { } protected override void ParseTableInfo(DataRow rs) { Catalog = Convert.ToString(rs["TABLE_CATALOG"]); Schema = Convert.ToString(rs["TABLE_SCHEMA"]); if (string.IsNullOrEmpty(Catalog)) Catalog = null; if (string.IsNullOrEmpty(Schema)) Schema = null; Name = Convert.ToString(rs["TABLE_NAME"]); } protected override string GetConstraintName(DataRow rs) { return Convert.ToString(rs["CONSTRAINT_NAME"]); } protected override string GetColumnName(DataRow rs) { return Convert.ToString(rs["COLUMN_NAME"]); } protected override string GetIndexName(DataRow rs) { return Convert.ToString(rs["INDEX_NAME"]); } protected override IColumnMetadata GetColumnMetadata(DataRow rs) { return new FirebirdColumnMetadata(rs); } protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) { return new FirebirdForeignKeyMetadata(rs); } protected override IIndexMetadata GetIndexMetadata(DataRow rs) { return new FirebirdIndexMetadata(rs); } } public class FirebirdColumnMetadata : AbstractColumnMetaData { public FirebirdColumnMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["COLUMN_NAME"]); object aValue; aValue = rs["COLUMN_SIZE"]; if (aValue != DBNull.Value) ColumnSize = Convert.ToInt32(aValue); aValue = rs["NUMERIC_PRECISION"]; if (aValue != DBNull.Value) NumericalPrecision = Convert.ToInt32(aValue); Nullable = Convert.ToString(rs["IS_NULLABLE"]); TypeName = Convert.ToString(rs["COLUMN_DATA_TYPE"]); } } public class FirebirdIndexMetadata : AbstractIndexMetadata { public FirebirdIndexMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["INDEX_NAME"]); } } public class FirebirdForeignKeyMetadata : AbstractForeignKeyMetadata { public FirebirdForeignKeyMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["CONSTRAINT_NAME"]); } } |
| ||||
public class MsSqlTableMetadata: AbstractTableMetadata { public MsSqlTableMetadata(DataRow rs, IDataBaseSchema meta, bool extras) : base(rs, meta, extras) { } protected override void ParseTableInfo(DataRow rs) { Catalog = Convert.ToString(rs["TABLE_CATALOG"]); Schema = Convert.ToString(rs["TABLE_SCHEMA"]); if (string.IsNullOrEmpty(Catalog)) Catalog = null; if (string.IsNullOrEmpty(Schema)) Schema = null; Name = Convert.ToString(rs["TABLE_NAME"]); } protected override string GetConstraintName(DataRow rs) { return Convert.ToString(rs["CONSTRAINT_NAME"]); } protected override string GetColumnName(DataRow rs) { return Convert.ToString(rs["COLUMN_NAME"]); } protected override string GetIndexName(DataRow rs) { return Convert.ToString(rs["INDEX_NAME"]); } protected override IColumnMetadata GetColumnMetadata(DataRow rs) { return new MsSqlColumnMetadata(rs); } protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) { return new MsSqlForeignKeyMetadata(rs); } protected override IIndexMetadata GetIndexMetadata(DataRow rs) { return new MsSqlIndexMetadata(rs); } } public class MsSqlColumnMetadata : AbstractColumnMetaData { public MsSqlColumnMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["COLUMN_NAME"]); object aValue; aValue = rs["CHARACTER_MAXIMUM_LENGTH"]; if (aValue != DBNull.Value) ColumnSize = Convert.ToInt32(aValue); aValue = rs["NUMERIC_PRECISION"]; if (aValue != DBNull.Value) NumericalPrecision = Convert.ToInt32(aValue); Nullable = Convert.ToString(rs["IS_NULLABLE"]); TypeName = Convert.ToString(rs["DATA_TYPE"]); } } public class MsSqlIndexMetadata: AbstractIndexMetadata { public MsSqlIndexMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["INDEX_NAME"]); } } public class MsSqlForeignKeyMetadata : AbstractForeignKeyMetadata { public MsSqlForeignKeyMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["CONSTRAINT_NAME"]); } } |
| ||||
public class MySQLTableMetadata : AbstractTableMetadata { public MySQLTableMetadata(DataRow rs, IDataBaseSchema meta, bool extras) : base(rs, meta, extras) { } protected override void ParseTableInfo(DataRow rs) { Catalog = Convert.ToString(rs["TABLE_CATALOG"]); Schema = Convert.ToString(rs["TABLE_SCHEMA"]); if (string.IsNullOrEmpty(Catalog)) Catalog = null; if (string.IsNullOrEmpty(Schema)) Schema = null; Name = Convert.ToString(rs["TABLE_NAME"]); } protected override string GetConstraintName(DataRow rs) { return Convert.ToString(rs["CONSTRAINT_NAME"]); } protected override string GetColumnName(DataRow rs) { return Convert.ToString(rs["COLUMN_NAME"]); } protected override string GetIndexName(DataRow rs) { return Convert.ToString(rs["INDEX_NAME"]); } protected override IColumnMetadata GetColumnMetadata(DataRow rs) { return new MySQLColumnMetadata(rs); } protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) { return new MySQLForeignKeyMetadata(rs); } protected override IIndexMetadata GetIndexMetadata(DataRow rs) { return new MySQLIndexMetadata(rs); } } public class MySQLColumnMetadata : AbstractColumnMetaData { public MySQLColumnMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["COLUMN_NAME"]); object aValue; aValue = rs["CHARACTER_MAXIMUM_LENGTH"]; if (aValue != DBNull.Value) ColumnSize = Convert.ToInt32(aValue); aValue = rs["NUMERIC_PRECISION"]; if (aValue != DBNull.Value) NumericalPrecision = Convert.ToInt32(aValue); Nullable = Convert.ToString(rs["IS_NULLABLE"]); TypeName = Convert.ToString(rs["DATA_TYPE"]); } } public class MySQLIndexMetadata : AbstractIndexMetadata { public MySQLIndexMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["INDEX_NAME"]); } } public class MySQLForeignKeyMetadata : AbstractForeignKeyMetadata { public MySQLForeignKeyMetadata(DataRow rs) : base(rs) { Name = Convert.ToString(rs["CONSTRAINT_NAME"]); } } |
| |||
public class [[#variable21e0e9a0]]: AbstractTableMetadata { public [[#variable21e0e9a0]](DataRow rs, IDataBaseSchema meta, bool extras): base(rs, meta, extras) { } protected override void ParseTableInfo(DataRow rs) { Catalog = Convert.ToString(rs["TABLE_CATALOG"]); Schema = Convert.ToString(rs["TABLE_SCHEMA"]); if (string.IsNullOrEmpty(Catalog)) Catalog = null; if (string.IsNullOrEmpty(Schema)) Schema = null; Name = Convert.ToString(rs["TABLE_NAME"]); } protected override string GetConstraintName(DataRow rs) { return Convert.ToString(rs["CONSTRAINT_NAME"]); } protected override string GetColumnName(DataRow rs) { return Convert.ToString(rs["COLUMN_NAME"]); } protected override string GetIndexName(DataRow rs) { return Convert.ToString(rs["INDEX_NAME"]); } protected override IColumnMetadata GetColumnMetadata(DataRow rs) { return new [[#variable21d9d020]](rs); } protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs) { return new [[#variable21c5ee60]](rs); } protected override IIndexMetadata GetIndexMetadata(DataRow rs) { return new [[#variable21c89340]](rs); } } public class [[#variable21d9d020]]: AbstractColumnMetaData { public [[#variable21d9d020]](DataRow rs): base(rs) { Name = Convert.ToString(rs["COLUMN_NAME"]); object aValue; aValue = rs[ [[#variable673ddac0]]]; if (aValue != DBNull.Value) ColumnSize = Convert.ToInt32(aValue); aValue = rs["NUMERIC_PRECISION"]; if (aValue != DBNull.Value) NumericalPrecision = Convert.ToInt32(aValue); Nullable = Convert.ToString(rs["IS_NULLABLE"]); TypeName = Convert.ToString(rs[ [[#variable673dc640]]]); } } public class [[#variable21c89340]]: AbstractIndexMetadata { public [[#variable21c89340]](DataRow rs): base(rs) { Name = Convert.ToString(rs["INDEX_NAME"]); } } public class [[#variable21c5ee60]]: AbstractForeignKeyMetadata { public [[#variable21c5ee60]](DataRow rs): base(rs) { Name = Convert.ToString(rs["CONSTRAINT_NAME"]); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#21e0e9a0]] | FirebirdTableMetadata |
1 | 2 | [[#21e0e9a0]] | MsSqlTableMetadata |
1 | 3 | [[#21e0e9a0]] | MySQLTableMetadata |
2 | 1 | [[#21d9d020]] | FirebirdColumnMetadata |
2 | 2 | [[#21d9d020]] | MsSqlColumnMetadata |
2 | 3 | [[#21d9d020]] | MySQLColumnMetadata |
3 | 1 | [[#21c5ee60]] | FirebirdForeignKeyMetadata |
3 | 2 | [[#21c5ee60]] | MsSqlForeignKeyMetadata |
3 | 3 | [[#21c5ee60]] | MySQLForeignKeyMetadata |
4 | 1 | [[#21c89340]] | FirebirdIndexMetadata |
4 | 2 | [[#21c89340]] | MsSqlIndexMetadata |
4 | 3 | [[#21c89340]] | MySQLIndexMetadata |
5 | 1 | [[#673ddac0]] | "COLUMN_SIZE" |
5 | 2 | [[#673ddac0]] | "CHARACTER_MAXIMUM_LENGTH" |
5 | 3 | [[#673ddac0]] | "CHARACTER_MAXIMUM_LENGTH" |
6 | 1 | [[#673dc640]] | "COLUMN_DATA_TYPE" |
6 | 2 | [[#673dc640]] | "DATA_TYPE" |
6 | 3 | [[#673dc640]] | "DATA_TYPE" |