Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
9 | 4 | 6 | 0.965 | block |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 9 | 19 | src/NHibernate.Test/PropertyTest/FieldGetterFixture.cs |
2 | 9 | 32 | src/NHibernate.Test/PropertyTest/FieldGetterFixture.cs |
3 | 9 | 45 | src/NHibernate.Test/PropertyTest/FieldGetterFixture.cs |
4 | 9 | 58 | src/NHibernate.Test/PropertyTest/FieldGetterFixture.cs |
| ||||
{ IGetter fieldGetter = ReflectHelper.GetGetter( typeof(FieldGetterClass), "Id", "field"); Assert.IsNotNull(fieldGetter, "should have found getter"); Assert.AreEqual( typeof(FieldAccessor.FieldGetter), fieldGetter.GetType(), "IGetter should be for a field."); Assert.AreEqual( typeof(Int32), fieldGetter.ReturnType, "returns Int32."); Assert.IsNull(fieldGetter.Method, "no MethodInfo for fields."); Assert.IsNull(fieldGetter.PropertyName, "no Property Names for fields."); Assert.AreEqual(7, fieldGetter.Get(obj), "Get() for Int32"); } |
| ||||
{ IGetter fieldGetter = ReflectHelper.GetGetter( typeof(FieldGetterClass), "PropertyOne", "field.camelcase"); Assert.IsNotNull(fieldGetter, "should have found getter"); Assert.AreEqual( typeof(FieldAccessor.FieldGetter), fieldGetter.GetType(), "IGetter should be for a field."); Assert.AreEqual( typeof(DateTime), fieldGetter.ReturnType, "returns DateTime."); Assert.IsNull(fieldGetter.Method, "no MethodInfo for fields."); Assert.IsNull(fieldGetter.PropertyName, "no Property Names for fields."); Assert.AreEqual(DateTime.Parse("2000-01-01"), fieldGetter.Get(obj), "Get() for DateTime"); } |
| ||||
{ IGetter fieldGetter = ReflectHelper.GetGetter( typeof(FieldGetterClass), "PropertyTwo", "field.camelcase-underscore"); Assert.IsNotNull(fieldGetter, "should have found getter"); Assert.AreEqual( typeof(FieldAccessor.FieldGetter), fieldGetter.GetType(), "IGetter should be for a field."); Assert.AreEqual( typeof(Boolean), fieldGetter.ReturnType, "returns Boolean."); Assert.IsNull(fieldGetter.Method, "no MethodInfo for fields."); Assert.IsNull(fieldGetter.PropertyName, "no Property Names for fields."); Assert.AreEqual(true, fieldGetter.Get(obj), "Get() for Boolean"); } |
| ||||
{ IGetter fieldGetter = ReflectHelper.GetGetter( typeof(FieldGetterClass), "PropertyFour", "field.lowercase-underscore"); Assert.IsNotNull(fieldGetter, "should have found getter"); Assert.AreEqual( typeof(FieldAccessor.FieldGetter), fieldGetter.GetType(), "IGetter should be for a field."); Assert.AreEqual( typeof(Int64), fieldGetter.ReturnType, "returns Int64."); Assert.IsNull(fieldGetter.Method, "no MethodInfo for fields."); Assert.IsNull(fieldGetter.PropertyName, "no Property Names for fields."); Assert.AreEqual(Int64.MaxValue, fieldGetter.Get(obj), "Get() for Int64"); } |
| |||
{ IGetter fieldGetter = ReflectHelper.GetGetter( typeof(FieldGetterClass), [[#variable6e70b5c0]], [[#variable6e70b520]]); Assert.IsNotNull(fieldGetter, "should have found getter"); Assert.AreEqual( typeof(FieldAccessor.FieldGetter), fieldGetter.GetType(), "IGetter should be for a field."); Assert.AreEqual( typeof( [[#variable6e70b460]]), fieldGetter.ReturnType, [[#variable6e70b3c0]]); Assert.IsNull(fieldGetter.Method, "no MethodInfo for fields."); Assert.IsNull(fieldGetter.PropertyName, "no Property Names for fields."); Assert.AreEqual( [[#variable6e70b320]], fieldGetter.Get(obj), [[#variable6e70b2a0]]); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6e70b5c0]] | "Id" |
1 | 2 | [[#6e70b5c0]] | "PropertyOne" |
1 | 3 | [[#6e70b5c0]] | "PropertyTwo" |
1 | 4 | [[#6e70b5c0]] | "PropertyFour" |
2 | 1 | [[#6e70b520]] | "field" |
2 | 2 | [[#6e70b520]] | "field.camelcase" |
2 | 3 | [[#6e70b520]] | "field.camelcase-underscore" |
2 | 4 | [[#6e70b520]] | "field.lowercase-underscore" |
3 | 1 | [[#6e70b460]] | Int32 |
3 | 2 | [[#6e70b460]] | DateTime |
3 | 3 | [[#6e70b460]] | Boolean |
3 | 4 | [[#6e70b460]] | Int64 |
4 | 1 | [[#6e70b3c0]] | "returns Int32." |
4 | 2 | [[#6e70b3c0]] | "returns DateTime." |
4 | 3 | [[#6e70b3c0]] | "returns Boolean." |
4 | 4 | [[#6e70b3c0]] | "returns Int64." |
5 | 1 | [[#6e70b320]] | 7 |
5 | 2 | [[#6e70b320]] | DateTime.Parse("2000-01-01") |
5 | 3 | [[#6e70b320]] | true |
5 | 4 | [[#6e70b320]] | Int64.MaxValue |
6 | 1 | [[#6e70b2a0]] | "Get() for Int32" |
6 | 2 | [[#6e70b2a0]] | "Get() for DateTime" |
6 | 3 | [[#6e70b2a0]] | "Get() for Boolean" |
6 | 4 | [[#6e70b2a0]] | "Get() for Int64" |