Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 2 | 0.994 | statement_list[10] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 14 | 1332 | src/NHibernate/Hql/Classic/QueryTranslator.cs |
2 | 14 | 51 | src/NHibernate/Hql/QuerySplitter.cs |
| ||||
// TODO H3.2 check if the QuerySplitter can do the work (this method is not present in H3.2) //scan the query string for class names appearing in the from clause and replace //with all persistent implementors of the class/interface, returning multiple //query strings (make sure we don't pick up a class in the select clause!) //TODO: this is one of the ugliest and most fragile pieces of code in Hibernate... string[] tokens = StringHelper.Split(ParserHelper.Whitespace + "(),", query, true); if (tokens.Length == 0) { return new String[] { query } ; } // just especially for the trivial collection filter ArrayList placeholders = new ArrayList(); ArrayList replacements = new ArrayList(); StringBuilder templateQuery = new StringBuilder(40); int count = 0; string last = null; int nextIndex = 0; string next = null; templateQuery.Append(tokens[0]); |
| ||||
string[] tokens = StringHelper.Split(StringHelper.WhiteSpace + "(),", query, true); if (tokens.Length == 0) { return new String[] { query } ; // just especially for the trivial collection filter } ArrayList placeholders = new ArrayList(); ArrayList replacements = new ArrayList(); StringBuilder templateQuery = new StringBuilder(40); int count = 0; string last = null; int nextIndex = 0; string next = null; templateQuery.Append(tokens[0]); |
| |||
// TODO H3.2 check if the QuerySplitter can do the work (this method is not present in H3.2) //scan the query string for class names appearing in the from clause and replace //with all persistent implementors of the class/interface, returning multiple //query strings (make sure we don't pick up a class in the select clause!) //TODO: this is one of the ugliest and most fragile pieces of code in Hibernate... string[] tokens = StringHelper.Split( [[#variable6b500760]]. [[#variable6b500740]]+ "(),", query, true); if (tokens.Length == 0) { return new String[] { query } ; // just especially for the trivial collection filter } // just especially for the trivial collection filter ArrayList placeholders = new ArrayList(); ArrayList replacements = new ArrayList(); StringBuilder templateQuery = new StringBuilder(40); int count = 0; string last = null; int nextIndex = 0; string next = null; templateQuery.Append(tokens[0]); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6b500760]] | ParserHelper |
1 | 2 | [[#6b500760]] | StringHelper |
2 | 1 | [[#6b500740]] | Whitespace |
2 | 2 | [[#6b500740]] | WhiteSpace |