CloneSet99


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
52210.999statement_list[8]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
152100
src/NHibernate/SqlCommand/Template.cs
252229
src/NHibernate/SqlCommand/Template.cs
Clone Instance
1
Line Count
52
Source Line
100
Source File
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]);


Clone Instance
2
Line Count
52
Source Line
229
Source File
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]);


Clone AbstractionParameter Count: 1Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#506651a0]]
Placeholder 
12[[#506651a0]]
placeholder