Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
6 | 6 | 6 | 0.962 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 6 | 10 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
2 | 6 | 18 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
3 | 6 | 26 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
4 | 6 | 34 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
5 | 6 | 42 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
6 | 6 | 50 | src/NHibernate.Test/EngineTest/NativeSQLQuerySpecificationTest.cs |
| ||||
[Test] public void Equality() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); Assert.AreEqual(sr1, sr2); } |
| ||||
[Test] public void HashCode() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); Assert.AreEqual(sr1.GetHashCode(), sr2.GetHashCode()); } |
| ||||
[Test] public void WhenChangeReturns_NotEqual() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAliasChanged", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); Assert.AreNotEqual(sr1, sr2); } |
| ||||
[Test] public void WhenChangeReturns_NotEqualHashCode() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAliasChanged", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); Assert.AreNotEqual(sr1.GetHashCode(), sr2.GetHashCode()); } |
| ||||
[Test] public void WhenChangeSpace_NotEqual() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "ANOTHER" } ); Assert.AreNotEqual(sr1, sr2); } |
| ||||
[Test] public void WhenChangeSpace_NotEqualHashCode() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "ANOTHER" } ); Assert.AreNotEqual(sr1.GetHashCode(), sr2.GetHashCode()); } |
| |||
[Test] public void [[#variable7003edc0]]() { var sr1 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn("myAlias", NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { "SOMETHING" } ); var sr2 = new NativeSQLQuerySpecification("SELECT * FROM SOMETHING", new INativeSQLQueryReturn[] { new NativeSQLQueryScalarReturn( [[#variable7003ed40]], NHibernateUtil.Int32), new NativeSQLQueryScalarReturn("otherAlias", NHibernateUtil.Int32) } , new List<string> { [[#variable7003ece0]]} ); Assert. [[#variable7003ec60]]( [[#variable7003eba0]], [[#variable7003eaa0]]); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#7003edc0]] | Equality |
1 | 2 | [[#7003edc0]] | WhenChangeReturns_NotEqual |
1 | 3 | [[#7003edc0]] | WhenChangeSpace_NotEqual |
1 | 4 | [[#7003edc0]] | HashCode |
1 | 5 | [[#7003edc0]] | WhenChangeReturns_NotEqualHashCode |
1 | 6 | [[#7003edc0]] | WhenChangeSpace_NotEqualHashCode |
2 | 1 | [[#7003ed40]] | "myAlias" |
2 | 2 | [[#7003ed40]] | "myAliasChanged" |
2 | 3 | [[#7003ed40]] | "myAlias" |
2 | 4 | [[#7003ed40]] | "myAlias" |
2 | 5 | [[#7003ed40]] | "myAliasChanged" |
2 | 6 | [[#7003ed40]] | "myAlias" |
3 | 1 | [[#7003ece0]] | "SOMETHING" |
3 | 2 | [[#7003ece0]] | "SOMETHING" |
3 | 3 | [[#7003ece0]] | "ANOTHER" |
3 | 4 | [[#7003ece0]] | "SOMETHING" |
3 | 5 | [[#7003ece0]] | "SOMETHING" |
3 | 6 | [[#7003ece0]] | "ANOTHER" |
4 | 1 | [[#7003ec60]] | AreEqual |
4 | 2 | [[#7003ec60]] | AreNotEqual |
4 | 3 | [[#7003ec60]] | AreNotEqual |
4 | 4 | [[#7003ec60]] | AreEqual |
4 | 5 | [[#7003ec60]] | AreNotEqual |
4 | 6 | [[#7003ec60]] | AreNotEqual |
5 | 1 | [[#7003eba0]] | sr1 |
5 | 2 | [[#7003eba0]] | sr1 |
5 | 3 | [[#7003eba0]] | sr1 |
5 | 4 | [[#7003eba0]] | sr1.GetHashCode() |
5 | 5 | [[#7003eba0]] | sr1.GetHashCode() |
5 | 6 | [[#7003eba0]] | sr1.GetHashCode() |
6 | 1 | [[#7003eaa0]] | sr2 |
6 | 2 | [[#7003eaa0]] | sr2 |
6 | 3 | [[#7003eaa0]] | sr2 |
6 | 4 | [[#7003eaa0]] | sr2.GetHashCode() |
6 | 5 | [[#7003eaa0]] | sr2.GetHashCode() |
6 | 6 | [[#7003eaa0]] | sr2.GetHashCode() |