CloneSet358


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22260.951block
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12215
src/NHibernate/Exceptions/ReflectionBasedSqlStateExtracter.cs
22240
src/NHibernate/Exceptions/ReflectionBasedSqlStateExtracter.cs
Clone Instance
1
Line Count
22
Source Line
15
Source File
src/NHibernate/Exceptions/ReflectionBasedSqlStateExtracter.cs

        {
            System.Type type;
            PropertyInfo pi;
            int nativeError;

            type = sqle.GetType();
            pi = type.GetProperty("Errors");
            if (pi == null) // there is no Errors property
            {
                return 0;
            }
            nativeError = 0;
            foreach (object o in (pi.GetValue(sqle, null) as IEnumerable))
            {
                pi = o.GetType().GetProperty("NativeError");
                if (pi == null)
                    return 0;
                nativeError = (int)pi.GetValue(o, null);
                if (nativeError != 0)
                    break;
            }
            return nativeError;
        }


Clone Instance
2
Line Count
22
Source Line
40
Source File
src/NHibernate/Exceptions/ReflectionBasedSqlStateExtracter.cs

        {
            System.Type type;
            PropertyInfo pi;
            string sqlState;

            type = sqle.GetType();
            pi = type.GetProperty("Errors");
            if (pi == null) // there is no Errors property
            {
                return null;
            }
            sqlState = "";
            foreach (object o in (pi.GetValue(sqle, null) as IEnumerable))
            {
                pi = o.GetType().GetProperty("SQLState");
                if (pi == null)
                    return null;
                sqlState = (string)pi.GetValue(o, null);
                if (sqlState.Length != 0)
                    break;
            }
            return sqlState;
        }


Clone AbstractionParameter Count: 6Parameter Bindings

{
   System.Type type;
   PropertyInfo pi;
    [[#variable6f5d6500]] [[#variable6f5d6480]];
   type = sqle.GetType();
   pi = type.GetProperty("Errors");
   if (pi == null) // there is no Errors property
   {
      return [[#variable6f5d6440]];
   }
    [[#variable6f5d6480]]= [[#variable6d652240]];
   foreach (object o in (pi.GetValue(sqle, null) as IEnumerable))
   {
      pi = o.GetType().GetProperty( [[#variable6f5d6380]]);
      if (pi == null)
         return [[#variable6f5d6440]];
       [[#variable6f5d6480]]= ( [[#variable6f5d6500]])pi.GetValue(o, null);
      if ( [[#variable6f5d6360]]!= 0)
         break;
   }
   return [[#variable6f5d6480]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6f5d6500]]
string 
12[[#6f5d6500]]
int 
21[[#6f5d6480]]
sqlState 
22[[#6f5d6480]]
nativeError 
31[[#6f5d6440]]
null 
32[[#6f5d6440]]
0 
41[[#6d652240]]
"" 
42[[#6d652240]]
0 
51[[#6f5d6380]]
"SQLState" 
52[[#6f5d6380]]
"NativeError" 
61[[#6f5d6360]]
sqlState.Length 
62[[#6f5d6360]]
nativeError