lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [27/58] lucenenet git commit: QueryParser.Flexible refactor: Formatting, removed commented code, changed some properties
Date Tue, 06 Dec 2016 15:12:02 GMT
QueryParser.Flexible refactor: Formatting, removed commented code, changed some properties


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/8e1931b9
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/8e1931b9
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/8e1931b9

Branch: refs/heads/master
Commit: 8e1931b90d662f9912ad8197c5414e90ada51c63
Parents: 19d323c
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Dec 4 21:42:38 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Dec 4 22:00:55 2016 +0700

----------------------------------------------------------------------
 .../Flexible/Core/Builders/QueryBuilder.cs      |   1 -
 .../Flexible/Core/Builders/QueryTreeBuilder.cs  |  24 +-
 .../Flexible/Core/Config/AbstractQueryConfig.cs |   8 -
 .../Flexible/Core/Config/ConfigurationKey.cs    |  17 +-
 .../Flexible/Core/Config/FieldConfig.cs         |   2 -
 .../Core/Messages/QueryParserMessages.cs        |   1 -
 .../Flexible/Core/Nodes/AndQueryNode.cs         |   2 -
 .../Flexible/Core/Nodes/AnyQueryNode.cs         |  24 +-
 .../Flexible/Core/Nodes/BooleanQueryNode.cs     |   6 +-
 .../Flexible/Core/Nodes/BoostQueryNode.cs       |   7 +-
 .../Flexible/Core/Nodes/DeletedQueryNode.cs     |   4 -
 .../Flexible/Core/Nodes/FieldQueryNode.cs       |   3 +-
 .../Flexible/Core/Nodes/FuzzyQueryNode.cs       |   4 +-
 .../Flexible/Core/Nodes/GroupQueryNode.cs       |   5 +-
 .../Core/Nodes/MatchAllDocsQueryNode.cs         |   3 -
 .../Flexible/Core/Nodes/ModifierQueryNode.cs    |   5 +-
 .../Core/Nodes/NoTokenFoundQueryNode.cs         |   3 -
 .../Flexible/Core/Nodes/OpaqueQueryNode.cs      |   6 +-
 .../Flexible/Core/Nodes/OrQueryNode.cs          |   1 -
 .../Flexible/Core/Nodes/PathQueryNode.cs        |   9 -
 .../Flexible/Core/Nodes/PhraseSlopQueryNode.cs  |   6 +-
 .../Flexible/Core/Nodes/ProximityQueryNode.cs   |  35 +-
 .../Flexible/Core/Nodes/QueryNodeImpl.cs        |  36 +-
 .../Flexible/Core/Nodes/QuotedFieldQueryNode.cs |   2 -
 .../Flexible/Core/Nodes/SlopQueryNode.cs        |   6 +-
 .../Core/Nodes/TokenizedPhraseQueryNode.cs      |   4 +-
 .../NoChildOptimizationQueryNodeProcessor.cs    |  12 -
 .../Core/Processors/QueryNodeProcessor.cs       |   1 -
 .../Core/Processors/QueryNodeProcessorImpl.cs   |  15 -
 .../Processors/QueryNodeProcessorPipeline.cs    | 206 +-------
 .../RemoveDeletedQueryNodesProcessor.cs         |  14 -
 .../Flexible/Core/QueryNodeError.cs             |   2 -
 .../Flexible/Core/QueryNodeException.cs         |   5 -
 .../Flexible/Core/QueryParserHelper.cs          |  10 +-
 .../Flexible/Core/Util/QueryNodeOperation.cs    |   8 -
 .../Flexible/Core/Util/UnescapedCharSequence.cs |   1 -
 .../Flexible/Messages/Message.cs                |   2 +-
 .../Flexible/Messages/MessageImpl.cs            |   8 +-
 .../Flexible/Messages/NLS.cs                    | 119 +----
 .../BooleanModifiersQueryNodeProcessor.cs       |  16 -
 .../PrecedenceQueryNodeProcessorPipeline.cs     |   5 -
 .../Standard/Builders/AnyQueryNodeBuilder.cs    |  16 -
 .../Builders/BooleanQueryNodeBuilder.cs         |  23 -
 .../Standard/Builders/BoostQueryNodeBuilder.cs  |   9 -
 .../Standard/Builders/DummyQueryNodeBuilder.cs  |   8 -
 .../Standard/Builders/FieldQueryNodeBuilder.cs  |   9 -
 .../Standard/Builders/FuzzyQueryNodeBuilder.cs  |  11 -
 .../Standard/Builders/GroupQueryNodeBuilder.cs  |  10 -
 .../Builders/MatchAllDocsQueryNodeBuilder.cs    |  11 -
 .../Builders/MatchNoDocsQueryNodeBuilder.cs     |  12 -
 .../Builders/ModifierQueryNodeBuilder.cs        |  10 -
 .../Builders/MultiPhraseQueryNodeBuilder.cs     |  17 -
 .../Builders/NumericRangeQueryNodeBuilder.cs    |  11 -
 .../Standard/Builders/PhraseQueryNodeBuilder.cs |  13 -
 .../Builders/PrefixWildcardQueryNodeBuilder.cs  |  10 -
 .../Standard/Builders/RegexpQueryNodeBuilder.cs |   9 -
 .../Standard/Builders/SlopQueryNodeBuilder.cs   |  11 -
 .../Builders/StandardBooleanQueryNodeBuilder.cs |  21 -
 .../Builders/StandardQueryTreeBuilder.cs        |  10 +-
 .../Builders/TermRangeQueryNodeBuilder.cs       |  10 -
 .../Builders/WildcardQueryNodeBuilder.cs        |   9 -
 .../Standard/Config/FieldBoostMapFCListener.cs  |   8 +-
 .../Config/FieldDateResolutionFCListener.cs     |   4 -
 .../Standard/Config/NumberDateFormat.cs         | 135 +----
 .../Flexible/Standard/Config/NumericConfig.cs   |   3 -
 .../Config/NumericFieldConfigListener.cs        |   5 -
 .../Config/StandardQueryConfigHandler.cs        |   7 +-
 .../Standard/Nodes/AbstractRangeQueryNode.cs    |  36 +-
 .../Standard/Nodes/MultiPhraseQueryNode.cs      |  11 +-
 .../Flexible/Standard/Nodes/NumericQueryNode.cs |  29 +-
 .../Standard/Nodes/NumericRangeQueryNode.cs     |   7 +-
 .../Standard/Nodes/PrefixWildcardQueryNode.cs   |   2 -
 .../Flexible/Standard/Nodes/RegexpQueryNode.cs  |   4 -
 .../Standard/Nodes/WildcardQueryNode.cs         |   2 -
 .../Flexible/Standard/Parser/CharStream.cs      |   1 -
 .../Standard/Parser/EscapeQuerySyntaxImpl.cs    | 103 ----
 .../Flexible/Standard/Parser/FastCharStream.cs  |   6 +-
 .../Flexible/Standard/Parser/ParseException.cs  |  11 +-
 .../Standard/Parser/StandardSyntaxParser.cs     |   1 +
 .../Flexible/Standard/Parser/TokenMgrError.cs   |  13 +-
 .../Processors/AllowLeadingWildcardProcessor.cs |  15 -
 .../Processors/AnalyzerQueryNodeProcessor.cs    |  38 --
 .../BooleanQuery2ModifierNodeProcessor.cs       |  12 +-
 ...SingleChildOptimizationQueryNodeProcessor.cs |  13 -
 .../Processors/BoostQueryNodeProcessor.cs       |  12 -
 .../DefaultPhraseSlopQueryNodeProcessor.cs      |  20 -
 .../Processors/FuzzyQueryNodeProcessor.cs       |  12 -
 .../Processors/GroupQueryNodeProcessor.cs       |  35 --
 .../LowercaseExpandedTermsQueryNodeProcessor.cs |  13 -
 .../MatchAllDocsQueryNodeProcessor.cs           |  12 -
 .../Processors/MultiFieldQueryNodeProcessor.cs  |  27 -
 .../MultiTermRewriteMethodProcessor.cs          |   6 -
 .../Processors/NumericQueryNodeProcessor.cs     |  14 -
 .../NumericRangeQueryNodeProcessor.cs           |  15 -
 .../Processors/OpenRangeQueryNodeProcessor.cs   |   5 -
 .../Processors/PhraseSlopQueryNodeProcessor.cs  |  10 -
 .../RemoveEmptyNonLeafQueryNodeProcessor.cs     |  19 -
 .../Processors/TermRangeQueryNodeProcessor.cs   |  12 -
 .../Processors/WildcardQueryNodeProcessor.cs    |  11 -
 .../Flexible/Standard/QueryParserUtil.cs        |   6 +-
 .../Flexible/Standard/StandardQueryParser.cs    | 515 +++++--------------
 .../Flexible/Messages/TestNLS.cs                |  15 -
 .../Flexible/Spans/SpanOrQueryNodeBuilder.cs    |  13 +-
 .../Flexible/Spans/SpanTermQueryNodeBuilder.cs  |  13 +-
 .../Flexible/Spans/SpansQueryConfigHandler.cs   |   2 +-
 .../Flexible/Spans/SpansQueryTreeBuilder.cs     |  13 -
 .../Spans/SpansValidatorQueryNodeProcessor.cs   |  16 +-
 .../Flexible/Spans/TestSpanQueryParser.cs       |  29 +-
 .../Spans/TestSpanQueryParserSimpleSample.cs    |  28 +-
 .../Flexible/Spans/UniqueFieldAttribute.cs      |   4 +-
 .../Flexible/Spans/UniqueFieldAttributeImpl.cs  |  18 +-
 .../Spans/UniqueFieldQueryNodeProcessor.cs      |  17 +-
 .../Standard/TestMultiAnalyzerQPHelper.cs       |   1 -
 .../Flexible/Standard/TestNumericQueryParser.cs | 234 ++-------
 .../Flexible/Standard/TestQPHelper.cs           | 509 +++++++++---------
 .../Flexible/Standard/TestStandardQP.cs         |  11 -
 116 files changed, 532 insertions(+), 2489 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryBuilder.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryBuilder.cs
index 5407858..520fe01 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryBuilder.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryBuilder.cs
@@ -32,7 +32,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
         /// </summary>
         /// <param name="queryNode">the query tree root node</param>
         /// <returns>some object generated from the query tree</returns>
-        /*object*/
         TQuery Build(IQueryNode queryNode); // LUCENENET specific - made return type generic so we don't need to deal with cast
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryTreeBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryTreeBuilder.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryTreeBuilder.cs
index 26c1989..92dc49a 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryTreeBuilder.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Builders/QueryTreeBuilder.cs
@@ -146,20 +146,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
             if (this.fieldNameBuilders != null && node is IFieldableNode)
             {
                 string field = ((IFieldableNode)node).Field;
-
-                //if (field != null)
-                //{
-                //    field = field.ToString();
-                //}
-
-                //builder = this.fieldNameBuilders[field];
                 this.fieldNameBuilders.TryGetValue(field, out builder);
-
             }
 
             if (builder == null && this.queryNodeBuilders != null)
             {
-
                 Type clazz = node.GetType();
 
                 do
@@ -178,30 +169,22 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
                             {
                                 break;
                             }
-
                         }
-
                     }
-
                 } while (builder == null && (clazz = clazz.BaseType) != null);
-
             }
 
             return builder;
-
         }
 
         private void ProcessNode(IQueryNode node, IQueryBuilder<TQuery> builder)
         {
-
             if (builder == null)
             {
-
                 throw new QueryNodeException(new MessageImpl(
                     QueryParserMessages.LUCENE_QUERY_CONVERSION_ERROR, node
                         .ToQueryString(new EscapeQuerySyntaxImpl()), node.GetType()
                         .Name));
-
             }
 
             object obj = builder.Build(node);
@@ -215,17 +198,14 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
 
         private IQueryBuilder<TQuery> GetQueryBuilder(Type clazz)
         {
-
             if (typeof(IQueryNode).IsAssignableFrom(clazz))
             {
                 IQueryBuilder<TQuery> result;
                 this.queryNodeBuilders.TryGetValue(clazz, out result);
                 return result;
-                //return this.queryNodeBuilders.get(clazz);
             }
 
             return null;
-
         }
 
         /**
@@ -240,13 +220,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Builders
          *         {@link QueryNodeException} or if there is a node which had no
          *         builder associated to it
          */
-
-        public virtual /*object*/ TQuery Build(IQueryNode queryNode)
+        public virtual TQuery Build(IQueryNode queryNode)
         {
             Process(queryNode);
 
             return (TQuery)queryNode.GetTag(QUERY_TREE_BUILDER_TAGID);
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Config/AbstractQueryConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Config/AbstractQueryConfig.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Config/AbstractQueryConfig.cs
index be1d910..204dbf5 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Config/AbstractQueryConfig.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Config/AbstractQueryConfig.cs
@@ -36,7 +36,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
          */
         public virtual T Get<T>(ConfigurationKey<T> key)
         {
-
             if (key == null)
             {
                 throw new ArgumentException("key cannot be null!");
@@ -44,8 +43,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
             object result;
             this.configMap.TryGetValue(key, out result);
             return result == null ? default(T) : (T)result;
-            //return (T)this.configMap.get(key);
-
         }
 
         /**
@@ -57,14 +54,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
          */
         public virtual bool Has<T>(ConfigurationKey<T> key)
         {
-
             if (key == null)
             {
                 throw new ArgumentException("key cannot be null!");
             }
 
             return this.configMap.ContainsKey(key);
-
         }
 
         /**
@@ -76,7 +71,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
          */
         public virtual void Set<T>(ConfigurationKey<T> key, T value)
         {
-
             if (key == null)
             {
                 throw new ArgumentException("key cannot be null!");
@@ -85,13 +79,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
             if (value == null)
             {
                 Unset(key);
-
             }
             else
             {
                 this.configMap[key] = value;
             }
-
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Config/ConfigurationKey.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Config/ConfigurationKey.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Config/ConfigurationKey.cs
index 5a18314..cdcad25 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Config/ConfigurationKey.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Config/ConfigurationKey.cs
@@ -16,18 +16,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
     public sealed class ConfigurationKey<T> : ConfigurationKey
     {
         internal ConfigurationKey() { }
-
-        /**
-         * Creates a new instance.
-         * 
-         * @param <T> the value's type
-         * 
-         * @return a new instance
-         */
-        //public static ConfigurationKey<T> NewInstance()
-        //{
-        //    return new ConfigurationKey<T>();
-        //}
     }
 
     /// <summary>
@@ -37,6 +25,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
     /// </summary>
     public abstract class ConfigurationKey
     {
+        /// <summary>
+        /// Creates a new instance.
+        /// </summary>
+        /// <typeparam name="T">the value's type</typeparam>
+        /// <returns>a new instance</returns>
         public static ConfigurationKey<T> NewInstance<T>()
         {
             return new ConfigurationKey<T>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Config/FieldConfig.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Config/FieldConfig.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Config/FieldConfig.cs
index cd5d124..780e8c8 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Config/FieldConfig.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Config/FieldConfig.cs
@@ -21,14 +21,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Config
          */
         public FieldConfig(string fieldName)
         {
-
             if (fieldName == null)
             {
                 throw new ArgumentException("field name should not be null!");
             }
 
             this.fieldName = fieldName;
-
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Messages/QueryParserMessages.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Messages/QueryParserMessages.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Messages/QueryParserMessages.cs
index 7378f45..d3bf105 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Messages/QueryParserMessages.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Messages/QueryParserMessages.cs
@@ -45,6 +45,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Messages
         public static string NUMBER_CLASS_NOT_SUPPORTED_BY_NUMERIC_RANGE_QUERY;
         public static string UNSUPPORTED_NUMERIC_DATA_TYPE;
         public static string NUMERIC_CANNOT_BE_EMPTY;
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AndQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AndQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AndQueryNode.cs
index 5b6aed2..2510340 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AndQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AndQueryNode.cs
@@ -27,7 +27,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
         }
 
-
         public override string ToString()
         {
             var children = GetChildren();
@@ -45,7 +44,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return sb.ToString();
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             var children = GetChildren();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AnyQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AnyQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AnyQueryNode.cs
index 72ed581..6f34f31 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AnyQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/AnyQueryNode.cs
@@ -29,13 +29,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
             if (clauses != null)
             {
-
                 foreach (IQueryNode clause in clauses)
                 {
-
                     if (clause is FieldQueryNode)
                     {
-
                         if (clause is QueryNodeImpl)
                         {
                             ((QueryNodeImpl)clause).toQueryStringIgnoreFields = true;
@@ -45,12 +42,9 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                         {
                             ((IFieldableNode)clause).Field = field;
                         }
-
                     }
                 }
-
             }
-
         }
 
         public virtual int MinimumMatchingElements
@@ -58,11 +52,9 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             get { return this.minimumMatchingmElements; }
         }
 
-        /**
-         * returns null if the field was not specified
-         * 
-         * @return the field
-         */
+        /// <summary>
+        /// Gets or sets the field name. Returns null if the field was not specified.
+        /// </summary>
         public virtual string Field
         {
             get { return this.field; }
@@ -85,16 +77,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 return this.field.ToString();
         }
 
-        ///**
-        // * @param field
-        // *          - the field to set
-        // */
-        //public virtual void SetField(string field)
-        //{
-        //    this.field = field;
-        //}
-
-
         public override IQueryNode CloneTree()
         {
             AnyQueryNode clone = (AnyQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BooleanQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BooleanQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BooleanQueryNode.cs
index d8b7c66..f466ce5 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BooleanQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BooleanQueryNode.cs
@@ -20,12 +20,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
         */
         public BooleanQueryNode(IList<IQueryNode> clauses)
         {
-            SetLeaf(false);
+            IsLeaf = false;
             Allocate();
             Set(clauses);
         }
 
-
         public override string ToString()
         {
             var children = GetChildren();
@@ -42,7 +41,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return sb.ToString();
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             var children = GetChildren();
@@ -65,7 +63,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 return "( " + sb.ToString() + " )";
         }
 
-
         public override IQueryNode CloneTree()
         {
             BooleanQueryNode clone = (BooleanQueryNode)base.CloneTree();
@@ -74,6 +71,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
             return clone;
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BoostQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BoostQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BoostQueryNode.cs
index f0a0a7f..1aeb847 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BoostQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/BoostQueryNode.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
 
             this.value = value;
-            SetLeaf(false);
+            IsLeaf = false;
             Allocate();
             Add(query);
         }
@@ -59,7 +59,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
                 return children[0];
             }
-
         }
 
         /**
@@ -84,17 +83,14 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 return "" + (long)f;
             else
                 return "" + f.ToString("0.0#######"); // LUCENENET TODO: Culture
-
         }
 
-
         public override string ToString()
         {
             return "<boost value='" + GetValueString() + "'>" + "\n"
                 + Child.ToString() + "\n</boost>";
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             if (Child == null)
@@ -103,7 +99,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 + GetValueString();
         }
 
-
         public override IQueryNode CloneTree()
         {
             BoostQueryNode clone = (BoostQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/DeletedQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/DeletedQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/DeletedQueryNode.cs
index 84694cb..56faef9 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/DeletedQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/DeletedQueryNode.cs
@@ -19,25 +19,21 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             // empty constructor
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escaper)
         {
             return "[DELETEDCHILD]";
         }
 
-
         public override string ToString()
         {
             return "<deleted/>";
         }
 
-
         public override IQueryNode CloneTree()
         {
             DeletedQueryNode clone = (DeletedQueryNode)base.CloneTree();
 
             return clone;
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FieldQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FieldQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FieldQueryNode.cs
index 45161e2..836ef88 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FieldQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FieldQueryNode.cs
@@ -73,7 +73,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             this.text = text;
             this.begin = begin;
             this.end = end;
-            this.SetLeaf(true);
+            this.IsLeaf = true;
 
         }
 
@@ -176,7 +176,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             fqn.toQueryStringIgnoreFields = this.toQueryStringIgnoreFields;
 
             return fqn;
-
         }
 
         public virtual string Value

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FuzzyQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FuzzyQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FuzzyQueryNode.cs
index 81b0cb7..991aa1c 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FuzzyQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/FuzzyQueryNode.cs
@@ -60,7 +60,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             : base(field, term, begin, end)
         {
             this.similarity = minSimilarity;
-            SetLeaf(true);
+            IsLeaf = true;
         }
 
         public virtual int PrefixLength
@@ -69,7 +69,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             set { this.prefixLength = value; }
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escaper)
         {
             if (IsDefaultField(this.field))
@@ -82,7 +81,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
         }
 
-
         public override string ToString()
         {
             return "<fuzzy field='" + this.field + "' similarity='" + this.similarity

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/GroupQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/GroupQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/GroupQueryNode.cs
index 9dcdbcb..aad3412 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/GroupQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/GroupQueryNode.cs
@@ -30,7 +30,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
 
             Allocate();
-            SetLeaf(false);
+            IsLeaf = false;
             Add(query);
         }
 
@@ -39,7 +39,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return GetChildren()[0];
         }
 
-
         public override string ToString()
         {
             return "<group>" + "\n" + GetChild().ToString() + "\n</group>";
@@ -54,7 +53,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return "( " + GetChild().ToQueryString(escapeSyntaxParser) + " )";
         }
 
-
         public override IQueryNode CloneTree()
         {
             GroupQueryNode clone = (GroupQueryNode)base.CloneTree();
@@ -68,6 +66,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             list.Add(child);
             this.Set(list);
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/MatchAllDocsQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/MatchAllDocsQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/MatchAllDocsQueryNode.cs
index 0a0ffa8..c047b28 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/MatchAllDocsQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/MatchAllDocsQueryNode.cs
@@ -18,19 +18,16 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             // empty constructor
         }
 
-
         public override string ToString()
         {
             return "<matchAllDocs field='*' term='*'/>";
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             return "*:*";
         }
 
-
         public override IQueryNode CloneTree()
         {
             MatchAllDocsQueryNode clone = (MatchAllDocsQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ModifierQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ModifierQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ModifierQueryNode.cs
index 9626f2d..c57a861 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ModifierQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ModifierQueryNode.cs
@@ -20,11 +20,8 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
     /// </summary>
     public class ModifierQueryNode : QueryNodeImpl
     {
-        
         // LUCENENET NOTE: Modifier enum moved outside of this class
 
-
-
         private Modifier modifier = Nodes.Modifier.MOD_NONE;
 
         /**
@@ -44,7 +41,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
 
             Allocate();
-            SetLeaf(false);
+            IsLeaf = false;
             Add(query);
             this.modifier = mod;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/NoTokenFoundQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/NoTokenFoundQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/NoTokenFoundQueryNode.cs
index 2152922..48a75e6 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/NoTokenFoundQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/NoTokenFoundQueryNode.cs
@@ -17,19 +17,16 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
         {
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escaper)
         {
             return "[NTF]";
         }
 
-
         public override string ToString()
         {
             return "<notokenfound/>";
         }
 
-
         public override IQueryNode CloneTree()
         {
             NoTokenFoundQueryNode clone = (NoTokenFoundQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OpaqueQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OpaqueQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OpaqueQueryNode.cs
index ebdb6ec..4afc033 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OpaqueQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OpaqueQueryNode.cs
@@ -26,26 +26,22 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
          */
         public OpaqueQueryNode(string schema, string value)
         {
-            this.SetLeaf(true);
+            this.IsLeaf = true;
 
             this.schema = schema;
             this.value = value;
-
         }
 
-
         public override string ToString()
         {
             return "<opaque schema='" + this.schema + "' value='" + this.value + "'/>";
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             return "@" + this.schema + ":'" + this.value + "'";
         }
 
-
         public override IQueryNode CloneTree()
         {
             OpaqueQueryNode clone = (OpaqueQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OrQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OrQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OrQueryNode.cs
index b8596f6..faff682 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OrQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/OrQueryNode.cs
@@ -44,7 +44,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return sb.ToString();
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             var children = GetChildren();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs
index 4b893f1..92eacd1 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PathQueryNode.cs
@@ -164,14 +164,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             List<PathQueryNode.QueryText> rValues = new List<PathQueryNode.QueryText>();
             for (int i = startIndex; i < this.values.Count; i++)
             {
-                //try
-                //{
                 rValues.Add((QueryText)this.values[i].Clone());
-                //}
-                //catch (CloneNotSupportedException e)
-                //{
-                //    // this will not happen
-                //}
             }
             return rValues;
         }
@@ -202,7 +195,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return path.ToString();
         }
 
-
         public override string ToString()
         {
             QueryText text = this.values[0];
@@ -211,7 +203,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 + GetPathString() + "'/>";
         }
 
-
         public override IQueryNode CloneTree()
         {
             PathQueryNode clone = (PathQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PhraseSlopQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PhraseSlopQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PhraseSlopQueryNode.cs
index 9cf9042..52d5f03 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PhraseSlopQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/PhraseSlopQueryNode.cs
@@ -28,7 +28,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
 
             this.value = value;
-            SetLeaf(false);
+            IsLeaf = false;
             Allocate();
             Add(query);
         }
@@ -50,17 +50,14 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 return "" + (long)f;
             else
                 return "" + f;
-
         }
 
-
         public override string ToString()
         {
             return "<phraseslop value='" + GetValueString() + "'>" + "\n"
                 + GetChild().ToString() + "\n</phraseslop>";
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             if (GetChild() == null)
@@ -69,7 +66,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 + GetValueString();
         }
 
-
         public override IQueryNode CloneTree()
         {
             PhraseSlopQueryNode clone = (PhraseSlopQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
index a825017..f159a88 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/ProximityQueryNode.cs
@@ -1,5 +1,4 @@
-´╗┐//using System;
-using Lucene.Net.QueryParsers.Flexible.Core.Messages;
+´╗┐using Lucene.Net.QueryParsers.Flexible.Core.Messages;
 using Lucene.Net.QueryParsers.Flexible.Core.Parser;
 using Lucene.Net.QueryParsers.Flexible.Messages;
 using System;
@@ -22,7 +21,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
         /**
    * Distance condition: PARAGRAPH, SENTENCE, or NUMBER
    */
-
         public enum Type
         {
             PARAGRAPH,
@@ -30,28 +28,8 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             NUMBER
         }
 
-        //        public enum Type
-        //        {
-        //            PARAGRAPH /*{
-        //      @Override
-        //            CharSequence toQueryString() { return "WITHIN PARAGRAPH";
-        //        }
-        //    }*/,
-        //            SENTENCE  /*{ 
-        //      @Override
-        //      CharSequence toQueryString() { return "WITHIN SENTENCE"; }
-        //}*/,
-        //            NUMBER   /* {
-        //      @Override
-        //      CharSequence toQueryString() { return "WITHIN"; }
-        //    };*/
-        //        }
-
-        //    internal abstract string ToQueryString();
-        //}
-
         // LUCENENET NOTE: Moved ProximityType class outside of ProximityQueryNode class to
-        // prevent a naming conflict witht eh ProximityType property.
+        // prevent a naming conflict with the ProximityType property.
 
         private ProximityQueryNode.Type proximityType = ProximityQueryNode.Type.SENTENCE;
         private int distance = -1;
@@ -75,8 +53,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             ProximityQueryNode.Type type, int distance, bool inorder)
             : base(clauses)
         {
-
-            SetLeaf(false);
+            IsLeaf = false;
             this.proximityType = type;
             this.inorder = inorder;
             this.field = field;
@@ -87,13 +64,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                     throw new QueryNodeError(new MessageImpl(
                         QueryParserMessages.PARAMETER_VALUE_NOT_SUPPORTED, "distance",
                         distance));
-
                 }
                 else
                 {
                     this.distance = distance;
                 }
-
             }
             ClearFields(clauses, field);
         }
@@ -113,7 +88,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             ProximityQueryNode.Type type, bool inorder)
             : this(clauses, field, type, -1, inorder)
         {
-
         }
 
         private static void ClearFields(IList<IQueryNode> nodes, string field)
@@ -123,7 +97,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
             foreach (IQueryNode clause in nodes)
             {
-
                 if (clause is FieldQueryNode)
                 {
                     ((FieldQueryNode)clause).toQueryStringIgnoreFields = true;
@@ -159,7 +132,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return sb.ToString();
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             string withinSTR = this.proximityType.ToQueryString()
@@ -192,7 +164,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
         }
 
-
         public override IQueryNode CloneTree()
         {
             ProximityQueryNode clone = (ProximityQueryNode)base.CloneTree();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs
index 9d48fcb..99d9058 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QueryNodeImpl.cs
@@ -30,22 +30,18 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
         protected virtual void Allocate()
         {
-
             if (this.clauses == null)
             {
                 this.clauses = new List<IQueryNode>();
-
             }
             else
             {
                 this.clauses.Clear();
             }
-
         }
 
         public void Add(IQueryNode child)
         {
-
             if (IsLeaf || this.clauses == null || child == null)
             {
                 throw new ArgumentException(NLS
@@ -54,13 +50,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
 
             this.clauses.Add(child);
             ((QueryNodeImpl)child).SetParent(this);
-
         }
 
-
         public void Add(IList<IQueryNode> children)
         {
-
             if (IsLeaf || this.clauses == null)
             {
                 throw new ArgumentException(NLS
@@ -71,19 +64,16 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             {
                 Add(child);
             }
-
         }
 
-
         public virtual bool IsLeaf
         {
             get { return this.isLeaf; }
+            protected set { this.isLeaf = value; }
         }
 
-
         public void Set(IList<IQueryNode> children)
         {
-
             if (IsLeaf || this.clauses == null)
             {
                 //ResourceBundle bundle = ResourceBundle
@@ -95,7 +85,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 string message = bundle.GetString(QueryParserMessages.NODE_ACTION_NOT_SUPPORTED);
 
                 throw new ArgumentException(message);
-
             }
 
             // reset parent value
@@ -119,7 +108,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             Add(children);
         }
 
-
         public virtual IQueryNode CloneTree()
         {
             QueryNodeImpl clone = (QueryNodeImpl)this.MemberwiseClone();
@@ -142,22 +130,15 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return clone;
         }
 
-
-        public virtual /*IQueryNode*/ object Clone()
+        public virtual object Clone()
         {
             return CloneTree();
         }
 
-        protected virtual void SetLeaf(bool isLeaf)
-        {
-            this.isLeaf = isLeaf;
-        }
-
         /**
          * @return a List for QueryNode object. Returns null, for nodes that do not
          *         contain children. All leaf Nodes return null.
          */
-
         public IList<IQueryNode> GetChildren()
         {
             if (IsLeaf || this.clauses == null)
@@ -167,13 +148,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             return new List<IQueryNode>(this.clauses);
         }
 
-
         public virtual void SetTag(string tagName, object value)
         {
             this.tags[tagName.ToLower(CultureInfo.InvariantCulture)] = value;
         }
 
-
         public virtual void UnsetTag(string tagName)
         {
             this.tags.Remove(tagName.ToLower(CultureInfo.InvariantCulture));
@@ -201,7 +180,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
         }
 
-
         public virtual IQueryNode Parent
         {
             get { return this.parent; }
@@ -246,7 +224,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
          * 
          * @see org.apache.lucene.queryparser.flexible.core.nodes.QueryNode#toString()
          */
-
         public override string ToString()
         {
             return base.ToString();
@@ -267,15 +244,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             if (this.parent != null)
             {
                 IList<IQueryNode> parentChildren = this.parent.GetChildren();
-                //IEnumerator<IQueryNode> it = parentChildren.GetEnumerator();
-
-                //while (it.MoveNext())
-                //{
-                //    if (it.Current == this)
-                //    {
-                //        it.Remove();
-                //    }
-                //}
 
                 // LUCENENET NOTE: Loop in reverse so we can remove items
                 // without screwing up our iterator.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QuotedFieldQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QuotedFieldQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QuotedFieldQueryNode.cs
index a60597b..db2c9f3 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QuotedFieldQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/QuotedFieldQueryNode.cs
@@ -47,7 +47,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
         {
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escaper)
         {
             if (IsDefaultField(this.field))
@@ -60,7 +59,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
         }
 
-
         public override string ToString()
         {
             return "<quotedfield start='" + this.begin + "' end='" + this.end

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/SlopQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/SlopQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/SlopQueryNode.cs
index 20daf9f..55ab7d5 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/SlopQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/SlopQueryNode.cs
@@ -38,7 +38,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
             }
 
             this.value = value;
-            SetLeaf(false);
+            IsLeaf = false;
             Allocate();
             Add(query);
         }
@@ -60,17 +60,14 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 return "" + (long)f;
             else
                 return "" + f;
-
         }
 
-
         public override string ToString()
         {
             return "<slop value='" + GetValueString() + "'>" + "\n"
                 + GetChild().ToString() + "\n</slop>";
         }
 
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             if (GetChild() == null)
@@ -111,6 +108,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
                 }
             }
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/TokenizedPhraseQueryNode.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/TokenizedPhraseQueryNode.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/TokenizedPhraseQueryNode.cs
index 58f19ab..de22382 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/TokenizedPhraseQueryNode.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Nodes/TokenizedPhraseQueryNode.cs
@@ -15,11 +15,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
     {
         public TokenizedPhraseQueryNode()
         {
-            SetLeaf(false);
+            IsLeaf = false;
             Allocate();
         }
 
-
         public override string ToString()
         {
             var children = GetChildren();
@@ -37,7 +36,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Nodes
         }
 
         // This text representation is not re-parseable
-
         public override string ToQueryString(IEscapeQuerySyntax escapeSyntaxParser)
         {
             var children = GetChildren();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Processors/NoChildOptimizationQueryNodeProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/NoChildOptimizationQueryNodeProcessor.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/NoChildOptimizationQueryNodeProcessor.cs
index 862ad1f..6792a29 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/NoChildOptimizationQueryNodeProcessor.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/NoChildOptimizationQueryNodeProcessor.cs
@@ -23,46 +23,34 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             // empty constructor
         }
 
-
         protected override IQueryNode PostProcessNode(IQueryNode node)
         {
-
             if (node is BooleanQueryNode || node is BoostQueryNode
                 || node is TokenizedPhraseQueryNode
                 || node is ModifierQueryNode)
             {
-
                 IList<IQueryNode> children = node.GetChildren();
 
                 if (children != null && children.Count > 0)
                 {
-
                     foreach (IQueryNode child in children)
                     {
-
                         if (!(child is DeletedQueryNode))
                         {
                             return node;
                         }
-
                     }
-
                 }
 
                 return new MatchNoDocsQueryNode();
-
             }
 
             return node;
-
         }
 
-
         protected override IQueryNode PreProcessNode(IQueryNode node)
         {
-
             return node;
-
         }
 
         protected override IList<IQueryNode> SetChildrenOrder(IList<IQueryNode> children)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessor.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessor.cs
index df3a851..00aa4a0 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessor.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessor.cs
@@ -56,6 +56,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
          *         otherwise it returns <code>null</code>
          */
         QueryConfigHandler GetQueryConfigHandler();
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorImpl.cs
index 23aa179..2dac303 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorImpl.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorImpl.cs
@@ -24,7 +24,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             this.queryConfig = queryConfigHandler;
         }
 
-
         public virtual IQueryNode Process(IQueryNode queryTree)
         {
             return ProcessIteration(queryTree);
@@ -39,7 +38,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             queryTree = PostProcessNode(queryTree);
 
             return queryTree;
-
         }
 
         /**
@@ -52,18 +50,15 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
          */
         protected virtual void ProcessChildren(IQueryNode queryTree)
         {
-
             IList<IQueryNode> children = queryTree.GetChildren();
             ChildrenList newChildren;
 
             if (children != null && children.Count > 0)
             {
-
                 newChildren = AllocateChildrenList();
 
                 try
                 {
-
                     foreach (IQueryNode child in children)
                     {
                         var child2 = ProcessIteration(child);
@@ -75,21 +70,17 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
                         }
 
                         newChildren.Add(child2);
-
                     }
 
                     IList<IQueryNode> orderedChildrenList = SetChildrenOrder(newChildren);
 
                     queryTree.Set(orderedChildrenList);
-
                 }
                 finally
                 {
                     newChildren.beingUsed = false;
                 }
-
             }
-
         }
 
         private ChildrenList AllocateChildrenList()
@@ -98,29 +89,24 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
 
             foreach (ChildrenList auxList in this.childrenListPool)
             {
-
                 if (!auxList.beingUsed)
                 {
                     list = auxList;
                     list.Clear();
 
                     break;
-
                 }
-
             }
 
             if (list == null)
             {
                 list = new ChildrenList();
                 this.childrenListPool.Add(list);
-
             }
 
             list.beingUsed = true;
 
             return list;
-
         }
 
         /**
@@ -133,7 +119,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
          * @see QueryNodeProcessor#getQueryConfigHandler()
          * @see QueryConfigHandler
          */
-
         public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
         {
             this.queryConfig = queryConfigHandler;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorPipeline.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorPipeline.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorPipeline.cs
index a19c390..0ea7db3 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorPipeline.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/QueryNodeProcessorPipeline.cs
@@ -11,7 +11,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
 {
     public class QueryNodeProcessorPipeline : IQueryNodeProcessor, IList<IQueryNodeProcessor>
     {
-        //private LinkedList<IQueryNodeProcessor> processors = new LinkedList<IQueryNodeProcessor>();
         private List<IQueryNodeProcessor> processors = new List<IQueryNodeProcessor>();
 
         private QueryConfigHandler queryConfig;
@@ -60,14 +59,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
 
         public virtual IQueryNode Process(IQueryNode queryTree)
         {
-
             foreach (IQueryNodeProcessor processor in this.processors)
             {
                 queryTree = processor.Process(queryTree);
             }
 
             return queryTree;
-
         }
 
         /**
@@ -79,7 +76,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
          * @see QueryNodeProcessor#getQueryConfigHandler()
          * @see QueryConfigHandler
          */
-
         public virtual void SetQueryConfigHandler(QueryConfigHandler queryConfigHandler)
         {
             this.queryConfig = queryConfigHandler;
@@ -88,13 +84,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             {
                 processor.SetQueryConfigHandler(this.queryConfig);
             }
-
         }
 
         /**
          * @see List#add(Object)
          */
-
         public virtual bool Add(IQueryNodeProcessor processor)
         {
             this.processors.Add(processor);
@@ -106,58 +100,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             }
 
             return added;
-
         }
 
         /**
-         * @see List#add(int, Object)
-         */
-
-        //public virtual void Add(int index, IQueryNodeProcessor processor)
-        //{
-        //    this.processors.Insert(index, processor);
-        //    processor.SetQueryConfigHandler(this.queryConfig);
-
-        //}
-
-        //      /**
-        //       * @see List#addAll(Collection)
-        //       */
-
-        //public virtual bool AddAll(Collection<? extends QueryNodeProcessor> c)
-        //      {
-        //          boolean anyAdded = this.processors.addAll(c);
-
-        //          for (QueryNodeProcessor processor : c)
-        //          {
-        //              processor.setQueryConfigHandler(this.queryConfig);
-        //          }
-
-        //          return anyAdded;
-
-        //      }
-
-        //      /**
-        //       * @see List#addAll(int, Collection)
-        //       */
-        //      @Override
-        //public boolean addAll(int index, Collection<? extends QueryNodeProcessor> c)
-        //      {
-        //          boolean anyAdded = this.processors.addAll(index, c);
-
-        //          for (QueryNodeProcessor processor : c)
-        //          {
-        //              processor.setQueryConfigHandler(this.queryConfig);
-        //          }
-
-        //          return anyAdded;
-
-        //      }
-
-        /**
          * @see List#clear()
          */
-
         public virtual void Clear()
         {
             this.processors.Clear();
@@ -166,30 +113,11 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
         /**
          * @see List#contains(Object)
          */
-
         public virtual bool Contains(object o)
         {
             return this.processors.Contains(o);
         }
 
-        //      /**
-        //       * @see List#containsAll(Collection)
-        //       */
-        //      @Override
-        //public boolean containsAll(Collection<?> c)
-        //      {
-        //          return this.processors.containsAll(c);
-        //      }
-
-        //      /**
-        //       * @see List#get(int)
-        //       */
-        //      @Override
-        //public QueryNodeProcessor Get(int index)
-        //      {
-        //          return this.processors.get(index);
-        //      }
-
         public virtual IQueryNodeProcessor this[int index]
         {
             get
@@ -205,130 +133,49 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
                 {
                     value.SetQueryConfigHandler(this.queryConfig);
                 }
-
-                //return oldProcessor;
             }
         }
 
         /**
-         * @see List#indexOf(Object)
-         */
-
-        public virtual int IndexOf(object o)
-        {
-            return this.processors.IndexOf(o as IQueryNodeProcessor);
-        }
-
+        * @see List#indexOf(Object)
+        */
         public virtual int IndexOf(IQueryNodeProcessor o)
         {
             return this.processors.IndexOf(o);
         }
 
-        //      /**
-        //       * @see List#isEmpty()
-        //       */
-        //      @Override
-        //public boolean isEmpty()
-        //      {
-        //          return this.processors.isEmpty();
-        //      }
-
-        //      /**
-        //       * @see List#iterator()
-        //       */
-        //      @Override
-        //public Iterator<QueryNodeProcessor> iterator()
-        //      {
-        //          return this.processors.iterator();
-        //      }
-
+        /**
+         * @see List#iterator()
+         */
         public virtual IEnumerator<IQueryNodeProcessor> GetEnumerator()
         {
             return this.processors.GetEnumerator();
         }
 
-        //      /**
-        //       * @see List#lastIndexOf(Object)
-        //       */
-        //      @Override
-        //public int lastIndexOf(Object o)
-        //      {
-        //          return this.processors.lastIndexOf(o);
-        //      }
-
-        //      /**
-        //       * @see List#listIterator()
-        //       */
-        //      @Override
-        //public ListIterator<QueryNodeProcessor> listIterator()
-        //      {
-        //          return this.processors.listIterator();
-        //      }
-
-        //      /**
-        //       * @see List#listIterator(int)
-        //       */
-        //      @Override
-        //public ListIterator<QueryNodeProcessor> listIterator(int index)
-        //      {
-        //          return this.processors.listIterator(index);
-        //      }
-
         /**
          * @see List#remove(Object)
          */
-
-        //public virtual bool Remove(object o)
-        //{
-        //    return this.processors.Remove(o as IQueryNodeProcessor);
-        //}
-
         public virtual bool Remove(IQueryNodeProcessor o)
         {
             return this.processors.Remove(o);
         }
 
-        //      /**
-        //       * @see List#remove(int)
-        //       */
-        //      @Override
-        //public QueryNodeProcessor remove(int index)
-        //      {
-        //          return this.processors.remove(index);
-        //      }
-
+        /**
+         * @see List#remove(int)
+         */
         public virtual void RemoveAt(int index)
         {
             this.processors.RemoveAt(index);
         }
 
-        //      /**
-        //       * @see List#removeAll(Collection)
-        //       */
-        //      @Override
-        //public boolean removeAll(Collection<?> c)
-        //      {
-        //          return this.processors.removeAll(c);
-        //      }
-
         public virtual void RemoveRange(int index, int count)
         {
             this.processors.RemoveRange(index, count);
         }
 
-        //      /**
-        //       * @see List#retainAll(Collection)
-        //       */
-        //      @Override
-        //public boolean retainAll(Collection<?> c)
-        //      {
-        //          return this.processors.retainAll(c);
-        //      }
-
         /**
          * @see List#set(int, Object)
          */
-
         public virtual IQueryNodeProcessor Set(int index, IQueryNodeProcessor processor)
         {
             IQueryNodeProcessor oldProcessor = this.processors[index];
@@ -340,18 +187,8 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             }
 
             return oldProcessor;
-
         }
 
-        //      /**
-        //       * @see List#size()
-        //       */
-        //      @Override
-        //public int size()
-        //      {
-        //          return this.processors.size();
-        //      }
-
         public virtual int Count
         {
             get { return this.processors.Count; }
@@ -365,15 +202,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             }
         }
 
-        //      /**
-        //       * @see List#subList(int, int)
-        //       */
-        //      @Override
-        //public List<QueryNodeProcessor> subList(int fromIndex, int toIndex)
-        //      {
-        //          return this.processors.subList(fromIndex, toIndex);
-        //      }
-
         public virtual List<IQueryNodeProcessor> GetRange(int index, int count)
         {
             return this.processors.GetRange(index, count);
@@ -404,23 +232,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
         {
             return GetEnumerator();
         }
-
-        //      /**
-        //       * @see List#toArray(Object[])
-        //       */
-        //      @Override
-        //public <T> T[] toArray(T[] array)
-        //      {
-        //          return this.processors.toArray(array);
-        //      }
-
-        //      /**
-        //       * @see List#toArray()
-        //       */
-        //      @Override
-        //public Object[] toArray()
-        //      {
-        //          return this.processors.toArray();
-        //      }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Processors/RemoveDeletedQueryNodesProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/RemoveDeletedQueryNodesProcessor.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/RemoveDeletedQueryNodesProcessor.cs
index ef3fa43..d029bb6 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Processors/RemoveDeletedQueryNodesProcessor.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Processors/RemoveDeletedQueryNodesProcessor.cs
@@ -19,7 +19,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             // empty constructor
         }
 
-
         public override IQueryNode Process(IQueryNode queryTree)
         {
             queryTree = base.Process(queryTree);
@@ -27,19 +26,14 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
             if (queryTree is DeletedQueryNode
                 && !(queryTree is MatchNoDocsQueryNode))
             {
-
                 return new MatchNoDocsQueryNode();
-
             }
 
             return queryTree;
-
         }
 
-
         protected override IQueryNode PostProcessNode(IQueryNode node)
         {
-
             if (!node.IsLeaf)
             {
                 IList<IQueryNode> children = node.GetChildren();
@@ -48,7 +42,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
                 if (children == null || children.Count == 0)
                 {
                     removeBoolean = true;
-
                 }
                 else
                 {
@@ -61,34 +54,27 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Processors
                         {
                             removeBoolean = false;
                             break;
-
                         }
-
                     }
-
                 }
 
                 if (removeBoolean)
                 {
                     return new DeletedQueryNode();
                 }
-
             }
 
             return node;
         }
 
-
         protected override IList<IQueryNode> SetChildrenOrder(IList<IQueryNode> children)
         {
             for (int i = 0; i < children.Count; i++)
             {
-
                 if (children[i] is DeletedQueryNode)
                 {
                     children.RemoveAt(i--);
                 }
-
             }
 
             return children;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeError.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeError.cs b/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeError.cs
index e92e399..94342c2 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeError.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeError.cs
@@ -47,7 +47,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             : base(message.Key, throwable)
         {
             this.message = message;
-
         }
 
         /*
@@ -55,7 +54,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
          * 
          * @see org.apache.lucene.messages.NLSException#getMessageObject()
          */
-
         public virtual IMessage MessageObject
         {
             get { return this.message; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeException.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeException.cs b/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeException.cs
index 1a6accd..5362a80 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeException.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/QueryNodeException.cs
@@ -29,7 +29,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             : base(message.Key)
         {
             this.message = message;
-
         }
 
         public QueryNodeException(Exception throwable)
@@ -43,19 +42,16 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             this.message = message;
         }
 
-
         public virtual IMessage MessageObject
         {
             get { return this.message; }
         }
 
-
         public override string Message
         {
             get { return GetLocalizedMessage(); }
         }
 
-
         public virtual string GetLocalizedMessage()
         {
             return GetLocalizedMessage(CultureInfo.InvariantCulture);
@@ -66,7 +62,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             return this.message.GetLocalizedMessage(locale);
         }
 
-
         public override string ToString()
         {
             return this.message.Key + ": " + GetLocalizedMessage();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/QueryParserHelper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/QueryParserHelper.cs b/src/Lucene.Net.QueryParser/Flexible/Core/QueryParserHelper.cs
index 73e582b..beb7218 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/QueryParserHelper.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/QueryParserHelper.cs
@@ -65,7 +65,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             {
                 processor.SetQueryConfigHandler(queryConfigHandler);
             }
-
         }
 
         /**
@@ -101,7 +100,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
         {
             this.processor = processor;
             this.processor.SetQueryConfigHandler(QueryConfigHandler);
-
         }
 
         /**
@@ -116,14 +114,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
          */
         public virtual void SetSyntaxParser(ISyntaxParser syntaxParser)
         {
-
             if (syntaxParser == null)
             {
                 throw new ArgumentException("textParser should not be null!");
             }
 
             this.syntaxParser = syntaxParser;
-
         }
 
         /**
@@ -138,14 +134,12 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
          */
         public virtual void SetQueryBuilder(IQueryBuilder<TQuery> queryBuilder)
         {
-
             if (queryBuilder == null)
             {
                 throw new ArgumentException("queryBuilder should not be null!");
             }
 
             this.builder = queryBuilder;
-
         }
 
         /**
@@ -214,7 +208,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             {
                 processor.SetQueryConfigHandler(config);
             }
-
         }
 
         /**
@@ -242,7 +235,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
          * @throws QueryNodeException
          *           if something wrong happens along the three phases
          */
-        public virtual /*object*/ TQuery Parse(string query, string defaultField)
+        public virtual TQuery Parse(string query, string defaultField)
         {
             IQueryNode queryTree = SyntaxParser.Parse(query, defaultField);
 
@@ -254,7 +247,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core
             }
 
             return QueryBuilder.Build(queryTree);
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Util/QueryNodeOperation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Util/QueryNodeOperation.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Util/QueryNodeOperation.cs
index 9dc37b1..384a614 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Util/QueryNodeOperation.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Util/QueryNodeOperation.cs
@@ -48,8 +48,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Util
             else
                 op = ANDOperation.NONE;
 
-            //try
-            //{
             IQueryNode result = null;
             switch (op)
             {
@@ -72,14 +70,8 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Util
                     result.Add(q2.CloneTree().GetChildren());
                     return result;
             }
-            //}
-            //catch (CloneNotSupportedException e)
-            //{
-            //    throw new QueryNodeError(e);
-            //}
 
             return null;
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Core/Util/UnescapedCharSequence.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Core/Util/UnescapedCharSequence.cs b/src/Lucene.Net.QueryParser/Flexible/Core/Util/UnescapedCharSequence.cs
index c2c61a6..2212ef4 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Core/Util/UnescapedCharSequence.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Core/Util/UnescapedCharSequence.cs
@@ -99,7 +99,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Core.Util
                 newLength);
         }
 
-
         public override string ToString()
         {
             return new string(this.chars);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Messages/Message.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Messages/Message.cs b/src/Lucene.Net.QueryParser/Flexible/Messages/Message.cs
index c383704..d86d1d6 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Messages/Message.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Messages/Message.cs
@@ -14,7 +14,7 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
     public interface IMessage
     {
         string Key { get; }
-        object[] Arguments { get; }
+        object[] GetArguments();
         string GetLocalizedMessage();
         string GetLocalizedMessage(CultureInfo locale);
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs b/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
index a854af6..b34e90c 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Messages/MessageImpl.cs
@@ -30,9 +30,9 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
         }
 
 
-        public virtual object[] Arguments
+        public virtual object[] GetArguments()
         {
-            get { return this.arguments; }
+            return this.arguments;
         }
 
 
@@ -50,13 +50,13 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
 
         public virtual string GetLocalizedMessage(CultureInfo locale)
         {
-            return NLS.GetLocalizedMessage(Key, locale, Arguments);
+            return NLS.GetLocalizedMessage(Key, locale, GetArguments());
         }
 
 
         public override string ToString()
         {
-            object[] args = Arguments;
+            object[] args = GetArguments();
             StringBuilder sb = new StringBuilder(Key);
             if (args != null)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs b/src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs
index e1053c1..b7505d3 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Messages/NLS.cs
@@ -56,7 +56,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
 
             if (args.Length > 0)
             {
-                //str = MessageFormat.Format(str, args);
                 str = string.Format(locale, str, args);
             }
 
@@ -97,7 +96,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
             // Set the UI culture to the passed in locale.
             using (var culture = new CultureContext(locale, locale))
             {
-
                 // slow resource checking
                 // need to loop thru all registered resource bundles
                 for (IEnumerator<string> it = bundles.Keys.GetEnumerator(); it.MoveNext();)
@@ -117,23 +115,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
                             // just continue it might be on the next resource bundle
                         }
                     }
-
-
-                    //ResourceBundle resourceBundle = ResourceBundle.getBundle(clazz.Name,
-                    //    locale);
-                    //if (resourceBundle != null)
-                    //{
-                    //    try
-                    //    {
-                    //        object obj = resourceBundle.getObject(messageKey);
-                    //        if (obj != null)
-                    //            return obj;
-                    //    }
-                    //    catch (MissingResourceException e)
-                    //    {
-                    //        // just continue it might be on the next resource bundle
-                    //    }
-                    //}
                 }
                 // if resource is not found
                 return null;
@@ -144,15 +125,13 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
         {
             FieldInfo[] fieldArray = clazz.GetFields();
 
-            //bool isFieldAccessible = (clazz.getModifiers() & Modifier.PUBLIC) != 0;
-
             // build a map of field names to Field objects
             int len = fieldArray.Length;
             IDictionary<string, FieldInfo> fields = new Dictionary<string, FieldInfo>(len * 2);
             for (int i = 0; i < len; i++)
             {
                 fields[fieldArray[i].Name] = fieldArray[i];
-                LoadFieldValue(fieldArray[i], /*isFieldAccessible,*/ clazz);
+                LoadFieldValue(fieldArray[i], clazz);
             }
         }
 
@@ -160,57 +139,8 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
         {
             field.SetValue(null, field.Name);
             ValidateMessage(field.Name, clazz);
-
-
-            //int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
-            //int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
-            //if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED)
-            //    return;
-
-            //// Set a value for this empty field.
-            //if (!isFieldAccessible)
-            //    MakeAccessible(field);
-            //try
-            //{
-            //    field.SetValue(null, field.Name);
-            //    ValidateMessage(field.Name, clazz);
-            //}
-            //catch (ArgumentException e)
-            //{
-            //    // should not happen
-            //}
-            ////catch (IllegalAccessException e)
-            ////{
-            ////    // should not happen
-            ////}
         }
 
-        //private static void loadfieldValue(FieldInfo field, bool isFieldAccessible,
-        //    Type clazz)
-        //{
-        //    int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC;
-        //    int MOD_MASK = MOD_EXPECTED | Modifier.FINAL;
-        //    if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED)
-        //        return;
-
-        //    // Set a value for this empty field.
-        //    if (!isFieldAccessible)
-        //        MakeAccessible(field);
-        //    try
-        //    {
-        //        field.SetValue(null, field.Name);
-        //        ValidateMessage(field.Name, clazz);
-        //    }
-        //    catch (ArgumentException e)
-        //    {
-        //        // should not happen
-        //    }
-        //    //catch (IllegalAccessException e)
-        //    //{
-        //    //    // should not happen
-        //    //}
-        //}
-
         /**
          * @param key
          *          - Message Key
@@ -240,31 +170,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
                 // since this code is just a test to see if the message is present on the
                 // system
             }
-
-            //// Test if the message is present in the resource bundle
-            //try
-            //{
-            //    ResourceBundle resourceBundle = ResourceBundle.getBundle(clazz.Name,
-            //        CultureInfo.InvariantCulture);
-            //    if (resourceBundle != null)
-            //    {
-            //        Object obj = resourceBundle.getObject(key);
-            //        //if (obj == null)
-            //        //  System.err.println("WARN: Message with key:" + key + " and locale: "
-            //        //      + Locale.getDefault() + " not found.");
-            //    }
-            //}
-            //catch (MissingResourceException e)
-            //{
-            //    //System.err.println("WARN: Message with key:" + key + " and locale: "
-            //    //    + Locale.getDefault() + " not found.");
-            //}
-            //catch (Exception e)
-            //{
-            //    // ignore all other errors and exceptions
-            //    // since this code is just a test to see if the message is present on the
-            //    // system
-            //}
         }
 
         /// <summary>
@@ -280,27 +185,5 @@ namespace Lucene.Net.QueryParsers.Flexible.Messages
         {
             return Type.GetType(clazz.Namespace + "." + clazz.Name + "Bundle, " + clazz.Assembly.FullName);
         }
-
-  //      /*
-  //       * Make a class field accessible
-  //       */
-  //      private static void MakeAccessible(FieldInfo field)
-  //      {
-  //          if (System.getSecurityManager() == null)
-  //          {
-  //              field.setAccessible(true);
-  //          }
-  //          else
-  //          {
-  //              AccessController.doPrivileged(new PrivilegedAction<Void>() {
-  //      @Override
-  //      public Void run()
-  //      {
-  //          field.setAccessible(true);
-  //          return null;
-  //      }
-  //  });
-  //  }
-  //}
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/BooleanModifiersQueryNodeProcessor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/BooleanModifiersQueryNodeProcessor.cs b/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/BooleanModifiersQueryNodeProcessor.cs
index a08a580..d1c7b85 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/BooleanModifiersQueryNodeProcessor.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/BooleanModifiersQueryNodeProcessor.cs
@@ -33,7 +33,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
             // empty constructor
         }
 
-
         public override IQueryNode Process(IQueryNode queryTree)
         {
             Operator? op = GetQueryConfigHandler().Get(ConfigurationKeys.DEFAULT_OPERATOR);
@@ -47,13 +46,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
             this.usingAnd = Operator.AND == op;
 
             return base.Process(queryTree);
-
         }
 
-
         protected override IQueryNode PostProcessNode(IQueryNode node)
         {
-
             if (node is AndQueryNode)
             {
                 this.childrenBuffer.Clear();
@@ -65,12 +61,10 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
                 }
 
                 node.Set(this.childrenBuffer);
-
             }
             else if (this.usingAnd && node is BooleanQueryNode
                 && !(node is OrQueryNode))
             {
-
                 this.childrenBuffer.Clear();
                 IList<IQueryNode> children = node.GetChildren();
 
@@ -80,21 +74,17 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
                 }
 
                 node.Set(this.childrenBuffer);
-
             }
 
             return node;
-
         }
 
         private IQueryNode ApplyModifier(IQueryNode node, Modifier mod)
         {
-
             // check if modifier is not already defined and is default
             if (!(node is ModifierQueryNode))
             {
                 return new ModifierQueryNode(node, mod);
-
             }
             else
             {
@@ -104,25 +94,19 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
                 {
                     return new ModifierQueryNode(modNode.GetChild(), mod);
                 }
-
             }
 
             return node;
-
         }
 
-
         protected override IQueryNode PreProcessNode(IQueryNode node)
         {
             return node;
         }
 
-
         protected override IList<IQueryNode> SetChildrenOrder(IList<IQueryNode> children)
         {
-
             return children;
-
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/PrecedenceQueryNodeProcessorPipeline.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/PrecedenceQueryNodeProcessorPipeline.cs b/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/PrecedenceQueryNodeProcessorPipeline.cs
index c8bc616..36a2e36 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/PrecedenceQueryNodeProcessorPipeline.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Precedence/Processors/PrecedenceQueryNodeProcessorPipeline.cs
@@ -29,18 +29,13 @@ namespace Lucene.Net.QueryParsers.Flexible.Precedence.Processors
         {
             for (int i = 0; i < Count; i++)
             {
-
                 if (this[i].GetType().Equals(typeof(BooleanQuery2ModifierNodeProcessor)))
                 {
                     RemoveAt(i--);
                 }
-
             }
 
-
             Add(new BooleanModifiersQueryNodeProcessor());
-
         }
-
     }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/8e1931b9/src/Lucene.Net.QueryParser/Flexible/Standard/Builders/AnyQueryNodeBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Flexible/Standard/Builders/AnyQueryNodeBuilder.cs b/src/Lucene.Net.QueryParser/Flexible/Standard/Builders/AnyQueryNodeBuilder.cs
index d30a524..b9f8f70 100644
--- a/src/Lucene.Net.QueryParser/Flexible/Standard/Builders/AnyQueryNodeBuilder.cs
+++ b/src/Lucene.Net.QueryParser/Flexible/Standard/Builders/AnyQueryNodeBuilder.cs
@@ -23,7 +23,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Builders
             // empty constructor
         }
 
-
         public virtual Query Build(IQueryNode queryNode)
         {
             AnyQueryNode andNode = (AnyQueryNode)queryNode;
@@ -33,7 +32,6 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Builders
 
             if (children != null)
             {
-
                 foreach (IQueryNode child in children)
                 {
                     object obj = child.GetTag(QueryTreeBuilder<Query>.QUERY_TREE_BUILDER_TAGID);
@@ -48,33 +46,19 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Builders
                         }
                         catch (BooleanQuery.TooManyClauses ex)
                         {
-
                             throw new QueryNodeException(new MessageImpl(
                                /*
                                 * IQQQ.Q0028E_TOO_MANY_BOOLEAN_CLAUSES,
                                 * BooleanQuery.getMaxClauseCount()
                                 */QueryParserMessages.EMPTY_MESSAGE), ex);
-
                         }
-
                     }
-
                 }
-
             }
 
             bQuery.MinimumNumberShouldMatch = andNode.MinimumMatchingElements;
 
             return bQuery;
-
         }
-
-        ///// <summary>
-        ///// LUCENENET specific overload for supporting IQueryBuilder
-        ///// </summary>
-        //object IQueryBuilder.Build(IQueryNode queryNode)
-        //{
-        //    return Build(queryNode);
-        //}
     }
 }


Mime
View raw message