Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
5 | 10 | 3 | 0.971 | class_member_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 5 | 285 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
2 | 5 | 292 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
3 | 5 | 299 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
4 | 5 | 306 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
5 | 6 | 313 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
6 | 8 | 321 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
7 | 7 | 331 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
8 | 5 | 340 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
9 | 7 | 347 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
10 | 5 | 356 | src/NHibernate.Test/SqlCommandTest/SqlStringFixture.cs |
| ||||
[Test] public void GetSubselectStringSimple() { SqlString sql = SqlString.Parse("select col from table where col = test order by col"); Assert.AreEqual(" from table where col = test ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringParameterInOrderBy() { SqlString sql = SqlString.Parse("select col from table where col = test order by ? asc"); Assert.AreEqual(" from table where col = test ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringSimpleEndsWithParameter() { SqlString sql = SqlString.Parse("select col from table where col = ? order by col"); Assert.AreEqual(" from table where col = ? ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringSimpleParameterInMiddle() { SqlString sql = SqlString.Parse("select col from table where col = ? and foo = bar order by col"); Assert.AreEqual(" from table where col = ? and foo = bar ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithFormulaProperty() { SqlString sql = SqlString.Parse("select (select foo from bar where foo=col order by foo) from table where col = ? order by col"); Assert.AreEqual(" from table where col = ? ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithSubselectInWhere() { SqlString sql = SqlString.Parse( "select (select foo from bar where foo=col order by foo) from table where col = (select yadda from blah where yadda=x order by yadda) order by col"); Assert.AreEqual(" from table where col = (select yadda from blah where yadda=x order by yadda) ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithFormulaPropertyWithSubselect() { SqlString sql = SqlString.Parse( "select (select (select blah from yadda where blah=foo order by blah) from bar where foo=col order by foo) from table where col = ? order by col"); Assert.AreEqual(" from table where col = ? ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithParenthesisOnlyInWhere() { SqlString sql = SqlString.Parse("select col from table where (col = test) order by col"); Assert.AreEqual(" from table where (col = test) ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithTwoFormulas() { SqlString sql = SqlString.Parse( "select (select foo from bar where foo=col order by foo), (select foo from bar where foo=col order by foo) from table where col = ? order by col"); Assert.AreEqual(" from table where col = ? ", sql.GetSubselectString().ToString()); } |
| ||||
[Test] public void GetSubselectStringWithOrderByInSubselect() { SqlString sql = SqlString.Parse("select col from table where (col = test) and id in (select id from foo order by bar)"); Assert.AreEqual(" from table where (col = test) and id in (select id from foo order by bar)", sql.GetSubselectString().ToString()); } |
| |||
[Test] public void [[#variable5e470380]]() { SqlString sql = SqlString.Parse( [[#variable5e470280]]); Assert.AreEqual( [[#variable5e4701e0]], sql.GetSubselectString().ToString()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#5e470380]] | GetSubselectStringSimple |
1 | 2 | [[#5e470380]] | GetSubselectStringWithFormulaProperty |
1 | 3 | [[#5e470380]] | GetSubselectStringSimpleParameterInMiddle |
1 | 4 | [[#5e470380]] | GetSubselectStringWithSubselectInWhere |
1 | 5 | [[#5e470380]] | GetSubselectStringWithParenthesisOnlyInWhere |
1 | 6 | [[#5e470380]] | GetSubselectStringWithOrderByInSubselect |
1 | 7 | [[#5e470380]] | GetSubselectStringWithFormulaPropertyWithSubselect |
1 | 8 | [[#5e470380]] | GetSubselectStringParameterInOrderBy |
1 | 9 | [[#5e470380]] | GetSubselectStringWithTwoFormulas |
1 | 10 | [[#5e470380]] | GetSubselectStringSimpleEndsWithParameter |
2 | 1 | [[#5e470280]] | "select col from table where col = test order by col" |
2 | 2 | [[#5e470280]] | "select (select foo from bar where foo=col order by foo) from table where col = ? order by col" |
2 | 3 | [[#5e470280]] | "select col from table where col = ? and foo = bar order by col" |
2 | 4 | [[#5e470280]] | "select (select foo from bar where foo=col order by foo) from table where col = (select yadda from blah where yadda=x order by yadda) order by col" |
2 | 5 | [[#5e470280]] | "select col from table where (col = test) order by col" |
2 | 6 | [[#5e470280]] | "select col from table where (col = test) and id in (select id from foo order by bar)" |
2 | 7 | [[#5e470280]] | "select (select (select blah from yadda where blah=foo order by blah) from bar where foo=col order by foo) from table where col = ? order by col" |
2 | 8 | [[#5e470280]] | "select col from table where col = test order by ? asc" |
2 | 9 | [[#5e470280]] | "select (select foo from bar where foo=col order by foo), (select foo from bar where foo=col order by foo) from table where col = ? order by col" |
2 | 10 | [[#5e470280]] | "select col from table where col = ? order by col" |
3 | 1 | [[#5e4701e0]] | " from table where col = test " |
3 | 2 | [[#5e4701e0]] | " from table where col = ? " |
3 | 3 | [[#5e4701e0]] | " from table where col = ? and foo = bar " |
3 | 4 | [[#5e4701e0]] | " from table where col = (select yadda from blah where yadda=x order by yadda) " |
3 | 5 | [[#5e4701e0]] | " from table where (col = test) " |
3 | 6 | [[#5e4701e0]] | " from table where (col = test) and id in (select id from foo order by bar)" |
3 | 7 | [[#5e4701e0]] | " from table where col = ? " |
3 | 8 | [[#5e4701e0]] | " from table where col = test " |
3 | 9 | [[#5e4701e0]] | " from table where col = ? " |
3 | 10 | [[#5e4701e0]] | " from table where col = ? " |