Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 6 | 0.971 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 17 | 95 | src/NHibernate/Dialect/Schema/AbstractTableMetadata.cs |
2 | 16 | 115 | src/NHibernate/Dialect/Schema/AbstractTableMetadata.cs |
| ||||
private void AddForeignKey(DataRow rs, IDataBaseSchema meta) { string fk = GetConstraintName(rs); if (string.IsNullOrEmpty(fk)) return; IForeignKeyMetadata info = GetForeignKeyMetadata(fk); if (info == null) { info = GetForeignKeyMetadata(rs); foreignKeys[info.Name.ToLowerInvariant()] = info; } foreach (DataRow row in meta.GetIndexColumns(catalog, schema, name, fk).Rows) { info.AddColumn(GetColumnMetadata(GetColumnName(row))); } } |
| ||||
private void AddIndex(DataRow rs, IDataBaseSchema meta) { string index = GetIndexName(rs); if (string.IsNullOrEmpty(index)) return; IIndexMetadata info = GetIndexMetadata(index); if (info == null) { info = GetIndexMetadata(rs); indexes[info.Name.ToLowerInvariant()] = info; } foreach (DataRow row in meta.GetIndexColumns(catalog, schema, name, index).Rows) { info.AddColumn(GetColumnMetadata(GetColumnName(row))); } } |
| |||
private void [[#variable2d35be00]](DataRow rs, IDataBaseSchema meta) { string [[#variable2d35bd60]]= [[#variable2d35bd00]](rs); if (string.IsNullOrEmpty( [[#variable2d35bd60]])) return; [[#variable2d35bc80]]info = [[#variable2d35bbe0]]( [[#variable2d35bd60]]); if (info == null) { info = [[#variable2d35bbe0]](rs); [[#variable2d35bb40]][info.Name.ToLowerInvariant()] = info; } foreach (DataRow row in meta.GetIndexColumns(catalog, schema, name, [[#variable2d35bd60]]).Rows) { info.AddColumn(GetColumnMetadata(GetColumnName(row))); } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#2d35be00]] | AddIndex |
1 | 2 | [[#2d35be00]] | AddForeignKey |
2 | 1 | [[#2d35bd60]] | index |
2 | 2 | [[#2d35bd60]] | fk |
3 | 1 | [[#2d35bd00]] | GetIndexName |
3 | 2 | [[#2d35bd00]] | GetConstraintName |
4 | 1 | [[#2d35bc80]] | IIndexMetadata |
4 | 2 | [[#2d35bc80]] | IForeignKeyMetadata |
5 | 1 | [[#2d35bbe0]] | GetIndexMetadata |
5 | 2 | [[#2d35bbe0]] | GetForeignKeyMetadata |
6 | 1 | [[#2d35bb40]] | indexes |
6 | 2 | [[#2d35bb40]] | foreignKeys |