CloneSet221


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
34210.998class_member_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134109
src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs
242146
src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs
Clone Instance
1
Line Count
34
Source Line
109
Source File
src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs

                public void WeakKeywords()
                {
                        int t = input.LA(1);

                        switch (t)
                        {
                                case ORDER:
                                case GROUP:
                                        // Case 1: Multi token keywords GROUP BY and ORDER BY
                                        // The next token ( LT(2) ) should be 'by'... otherwise, this is just an ident.
                                        if (input.LA(2) != LITERAL_by)
                                        {
                                                input.LT(1).Type = IDENT;
                                                if (log.IsDebugEnabled)
                                                {
                                                        log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
                                                }
                                        }
                                        break;
                                default:
                                        // Case 2: The current token is after FROM and before '.'.
                                        if (t != IDENT && input.LA( - 1) == FROM && input.LA(2) == DOT)
                                        {
                                                HqlToken hqlToken = (HqlToken)input.LT(1);
                                                if (hqlToken.PossibleId)
                                                {
                                                        hqlToken.Type = IDENT;
                                                        if (log.IsDebugEnabled)
                                                        {
                                                                log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
                                                        }
                                                }
                                        }
                                        break;
                        }
                }



Clone Instance
2
Line Count
42
Source Line
146
Source File
src/NHibernate/Hql/Ast/ANTLR/HqlParser.cs

        public void WeakKeywords2()
        {
            /*
             * path
             * alias in class? path
             * in open path close
             * alias in elements open path close
             * elements open path close
             * alias in path dot elements
            */
            int t = input.LA(1);

            switch (t)
            {
                case ORDER:
                case GROUP:
                    // Case 1: Multi token keywords GROUP BY and ORDER BY
                    // The next token ( LT(2) ) should be 'by'... otherwise, this is just an ident.
                    if (input.LA(2) != LITERAL_by)
                    {
                        input.LT(1).Type = IDENT;
                        if (log.IsDebugEnabled)
                        {
                            log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
                        }
                    }
                    break;
                default:
                    // Case 2: The current token is after FROM and before '.'.
                    if (t != IDENT && input.LA( - 1) == FROM && input.LA(2) == DOT)
                    {
                        HqlToken hqlToken = (HqlToken)input.LT(1);
                        if (hqlToken.PossibleId)
                        {
                            hqlToken.Type = IDENT;
                            if (log.IsDebugEnabled)
                            {
                                log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
                            }
                        }
                    }
                    break;
            }
        }



Clone AbstractionParameter Count: 1Parameter Bindings

public void [[#variable6975a320]]()
{
   /*
                * path
                * alias in class? path
                * in open path close
                * alias in elements open path close
                * elements open path close
                * alias in path dot elements
               */
   int t = input.LA(1);
   switch (t)
   {
      case ORDER:
      case GROUP:
         // Case 1: Multi token keywords GROUP BY and ORDER BY
         // The next token ( LT(2) ) should be 'by'... otherwise, this is just an ident.
         if (input.LA(2) != LITERAL_by)
         {
            input.LT(1).Type = IDENT;
            if (log.IsDebugEnabled)
            {
               log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
            }
         }
         break;
      default:
         // Case 2: The current token is after FROM and before '.'.
         if (t != IDENT && input.LA( - 1) == FROM && input.LA(2) == DOT)
         {
            HqlToken hqlToken = (HqlToken)input.LT(1);
            if (hqlToken.PossibleId)
            {
               hqlToken.Type = IDENT;
               if (log.IsDebugEnabled)
               {
                  log.Debug("weakKeywords() : new LT(1) token - " + input.LT(1));
               }
            }
         }
         break;
   }
}

 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6975a320]]
WeakKeywords 
12[[#6975a320]]
WeakKeywords2