Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
22 | 2 | 6 | 0.951 | block |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 22 | 15 | src/NHibernate/Exceptions/ReflectionBasedSqlStateExtracter.cs |
2 | 22 | 40 | 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; } |
| ||||
{ 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; } |
| |||
{ 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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6f5d6500]] | string |
1 | 2 | [[#6f5d6500]] | int |
2 | 1 | [[#6f5d6480]] | sqlState |
2 | 2 | [[#6f5d6480]] | nativeError |
3 | 1 | [[#6f5d6440]] | null |
3 | 2 | [[#6f5d6440]] | 0 |
4 | 1 | [[#6d652240]] | "" |
4 | 2 | [[#6d652240]] | 0 |
5 | 1 | [[#6f5d6380]] | "SQLState" |
5 | 2 | [[#6f5d6380]] | "NativeError" |
6 | 1 | [[#6f5d6360]] | sqlState.Length |
6 | 2 | [[#6f5d6360]] | nativeError |