Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
20 | 2 | 2 | 0.987 | statement_list[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 20 | 96 | src/NHibernate/Persister/Collection/BasicCollectionPersister.cs |
2 | 21 | 126 | src/NHibernate/Persister/Collection/BasicCollectionPersister.cs |
| ||||
if (hasIdentifier) { update.AddWhereFragment(new string[] { IdentifierColumnName } , IdentifierType, " = "); } else if (HasIndex && !indexContainsFormula) { update.AddWhereFragment(KeyColumnNames, KeyType, " = "). AddWhereFragment(IndexColumnNames, IndexType, " = "); } else { string[] cnames = ArrayHelper.Join(KeyColumnNames, ElementColumnNames, elementColumnIsInPrimaryKey); SqlType[] ctypes = ArrayHelper.Join(KeyType.SqlTypes(Factory), ElementType.SqlTypes(Factory), elementColumnIsInPrimaryKey); update.AddWhereFragment(cnames, ctypes, " = "); } if (Factory.Settings.IsCommentsEnabled) update.SetComment("update collection row " + Role); return update.ToSqlCommandInfo(); |
| ||||
if (hasIdentifier) { delete.AddWhereFragment(new string[] { IdentifierColumnName } , IdentifierType, " = "); } else if (HasIndex && !indexContainsFormula) { delete. AddWhereFragment(KeyColumnNames, KeyType, " = "). AddWhereFragment(IndexColumnNames, IndexType, " = "); } else { string[] cnames = ArrayHelper.Join(KeyColumnNames, ElementColumnNames, elementColumnIsInPrimaryKey); SqlType[] ctypes = ArrayHelper.Join(KeyType.SqlTypes(Factory), ElementType.SqlTypes(Factory), elementColumnIsInPrimaryKey); delete.AddWhereFragment(cnames, ctypes, " = "); } if (Factory.Settings.IsCommentsEnabled) delete.SetComment("delete collection row " + Role); return delete.ToSqlCommandInfo(); |
| |||
if (hasIdentifier) { [[#variable701b0460]].AddWhereFragment(new string[] { IdentifierColumnName } , IdentifierType, " = "); } else if (HasIndex && !indexContainsFormula) { [[#variable701b0460]].AddWhereFragment(KeyColumnNames, KeyType, " = ").AddWhereFragment(IndexColumnNames, IndexType, " = "); } else { string[] cnames = ArrayHelper.Join(KeyColumnNames, ElementColumnNames, elementColumnIsInPrimaryKey); SqlType[] ctypes = ArrayHelper.Join(KeyType.SqlTypes(Factory), ElementType.SqlTypes(Factory), elementColumnIsInPrimaryKey); [[#variable701b0460]].AddWhereFragment(cnames, ctypes, " = "); } if (Factory.Settings.IsCommentsEnabled) [[#variable701b0460]].SetComment( [[#variable701b0440]]+ Role); return [[#variable701b0460]].ToSqlCommandInfo(); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#701b0460]] | update |
1 | 2 | [[#701b0460]] | delete |
2 | 1 | [[#701b0440]] | "update collection row " |
2 | 2 | [[#701b0440]] | "delete collection row " |