CloneSet211


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
20220.987statement_list[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12096
src/NHibernate/Persister/Collection/BasicCollectionPersister.cs
221126
src/NHibernate/Persister/Collection/BasicCollectionPersister.cs
Clone Instance
1
Line Count
20
Source Line
96
Source File
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();


Clone Instance
2
Line Count
21
Source Line
126
Source File
src/NHibernate/Persister/Collection/BasicCollectionPersister.cs

                        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();


Clone AbstractionParameter Count: 2Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#701b0460]]
update 
12[[#701b0460]]
delete 
21[[#701b0440]]
"update collection row " 
22[[#701b0440]]
"delete collection row "