Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
52 | 2 | 1 | 0.999 | statement_list[8] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 52 | 100 | src/NHibernate/SqlCommand/Template.cs |
2 | 52 | 229 | src/NHibernate/SqlCommand/Template.cs |
| ||||
string token = nextToken; string lcToken = token.ToLowerInvariant(); hasMore = tokensEnum.MoveNext(); nextToken = hasMore ? tokensEnum.Current: null; bool isQuoteCharacter = false; if ( !quotedIdentifier && "'".Equals(token)) { quoted = !quoted; isQuoteCharacter = true; } if ( !quoted) { bool isOpenQuote; if ("`".Equals(token)) { isOpenQuote = !quotedIdentifier; token = lcToken = isOpenQuote ? dialect.OpenQuote.ToString(): dialect.CloseQuote.ToString(); quotedIdentifier = isOpenQuote; isQuoteCharacter = true; } else if ( !quotedIdentifier && (dialect.OpenQuote == token[0])) { isOpenQuote = true; quotedIdentifier = true; isQuoteCharacter = true; } else if (quotedIdentifier && (dialect.CloseQuote == token[0])) { quotedIdentifier = false; isQuoteCharacter = true; isOpenQuote = false; } else { isOpenQuote = false; } if (isOpenQuote) { result.Append(placeholder).Append('.'); } } bool quotedOrWhitespace = quoted || quotedIdentifier || isQuoteCharacter || char.IsWhiteSpace(token[0]); |
| ||||
string token = nextToken; string lcToken = token.ToLowerInvariant(); hasMore = tokensEnum.MoveNext(); nextToken = hasMore ? tokensEnum.Current: null; bool isQuoteCharacter = false; if ( !quotedIdentifier && "'".Equals(token)) { quoted = !quoted; isQuoteCharacter = true; } if ( !quoted) { bool isOpenQuote; if ("`".Equals(token)) { isOpenQuote = !quotedIdentifier; token = lcToken = isOpenQuote ? dialect.OpenQuote.ToString(): dialect.CloseQuote.ToString(); quotedIdentifier = isOpenQuote; isQuoteCharacter = true; } else if ( !quotedIdentifier && (dialect.OpenQuote == token[0])) { isOpenQuote = true; quotedIdentifier = true; isQuoteCharacter = true; } else if (quotedIdentifier && (dialect.CloseQuote == token[0])) { quotedIdentifier = false; isQuoteCharacter = true; isOpenQuote = false; } else { isOpenQuote = false; } if (isOpenQuote) { result.Append(Placeholder).Append('.'); } } bool quotedOrWhitespace = quoted || quotedIdentifier || isQuoteCharacter || char.IsWhiteSpace(token[0]); |
| |||
string token = nextToken; string lcToken = token.ToLowerInvariant(); hasMore = tokensEnum.MoveNext(); nextToken = hasMore ? tokensEnum.Current: null; bool isQuoteCharacter = false; if ( !quotedIdentifier && "'".Equals(token)) { quoted = !quoted; isQuoteCharacter = true; } if ( !quoted) { bool isOpenQuote; if ("`".Equals(token)) { isOpenQuote = !quotedIdentifier; token = lcToken = isOpenQuote ? dialect.OpenQuote.ToString(): dialect.CloseQuote.ToString(); quotedIdentifier = isOpenQuote; isQuoteCharacter = true; } else if ( !quotedIdentifier && (dialect.OpenQuote == token[0])) { isOpenQuote = true; quotedIdentifier = true; isQuoteCharacter = true; } else if (quotedIdentifier && (dialect.CloseQuote == token[0])) { quotedIdentifier = false; isQuoteCharacter = true; isOpenQuote = false; } else { isOpenQuote = false; } if (isOpenQuote) { result.Append( [[#variable506651a0]]).Append('.'); } } bool quotedOrWhitespace = quoted || quotedIdentifier || isQuoteCharacter || char.IsWhiteSpace(token[0]); |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#506651a0]] | Placeholder |
1 | 2 | [[#506651a0]] | placeholder |