CloneSet425


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
26250.968compilation_unit
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1261
src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs
2271
src/NHibernate/Hql/Classic/ClassicQueryTranslatorFactory.cs
Clone Instance
1
Line Count
26
Source Line
1
Source File
src/NHibernate/Hql/Ast/ANTLR/ASTQueryTranslatorFactory.cs

using System.Collections.Generic;
using NHibernate.Engine;

namespace NHibernate.Hql.Ast.ANTLR
{
        /// <summary>
        /// Generates translators which uses the Antlr-based parser to perform
        /// the translation.
        /// 
        /// Author: Gavin King
        /// Ported by: Steve Strong
        /// </summary>
        public class ASTQueryTranslatorFactory : IQueryTranslatorFactory
        {
                public IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory)
                {
                        return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory);
                }

                public IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory)
                {
                        return new QueryTranslatorImpl(queryIdentifier, queryString, filters, factory);
                }

        }
}


Clone Instance
2
Line Count
27
Source Line
1
Source File
src/NHibernate/Hql/Classic/ClassicQueryTranslatorFactory.cs

using System.Collections.Generic;
using NHibernate.Engine;

namespace NHibernate.Hql.Classic
{
        /// <summary>
        /// Generates translators which uses the older hand-written parser to perform the translation.
        /// </summary>
        public class ClassicQueryTranslatorFactory : IQueryTranslatorFactory
        {
                #region IQueryTranslatorFactory Members

                public IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters,
                                                              ISessionFactoryImplementor factory)
                {
                        return new QueryTranslator(queryIdentifier, queryString, filters, factory);
                }

                public IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters,
                                                                ISessionFactoryImplementor factory)
                {
                        return new QueryTranslator(queryIdentifier, queryString, filters, factory);
                }

                #endregion
        }
}


Clone AbstractionParameter Count: 5Parameter Bindings

using System.Collections.Generic;
using NHibernate.Engine;
namespace [[#variable6789d340]]. [[#variable6789d2a0]]. [[#variable6789d240]]
{
   /// <summary>
   /// Generates translators which uses the Antlr-based parser to perform
   /// the translation.
   /// 
   /// Author: Gavin King
   /// Ported by: Steve Strong
   /// Generates translators which uses the older hand-written parser to perform the translation.
   /// </summary>
   public class [[#variable6789d1c0]]: IQueryTranslatorFactory
   {
      #region IQueryTranslatorFactory Members
      public IQueryTranslator CreateQueryTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory)
      {
         return new [[#variable6789d160]](queryIdentifier, queryString, filters, factory);
      }

      public IFilterTranslator CreateFilterTranslator(string queryIdentifier, string queryString, IDictionary<string, IFilter> filters, ISessionFactoryImplementor factory)
      {
         return new [[#variable6789d160]](queryIdentifier, queryString, filters, factory);
      }

   #endregion
   }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#6789d340]]
NHibernate.Hql 
12[[#6789d340]]
NHibernate 
21[[#6789d2a0]]
Ast 
22[[#6789d2a0]]
Hql 
31[[#6789d240]]
ANTLR 
32[[#6789d240]]
Classic 
41[[#6789d1c0]]
ASTQueryTranslatorFactory 
42[[#6789d1c0]]
ClassicQueryTranslatorFactory 
51[[#6789d160]]
QueryTranslatorImpl 
52[[#6789d160]]
QueryTranslator