lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [5/7] lucenenet git commit: creating new projects in order to separate out logic create to suppliment .NET with JAVA standard library functionality.
Date Sun, 09 Nov 2014 22:07:49 GMT
creating new projects in order to separate out logic create to suppliment .NET with JAVA standard library functionality.


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

Branch: refs/heads/pcl
Commit: 4b4d4d93c9fcfadbd2afecd42d59150e87bdb962
Parents: d324216
Author: Michael Herndon <mherndon@michaelherndon.com>
Authored: Sat Aug 23 02:00:50 2014 -0400
Committer: Michael Herndon <mherndon@michaelherndon.com>
Committed: Sat Aug 23 02:00:50 2014 -0400

----------------------------------------------------------------------
 Lucene.vs2013.sln                               |   21 +
 Lucene.vs2013.sln.GhostDoc.user.dic             |    1 +
 src/Lucene.Net.Core/Lucene.Net.Core.csproj      |    3 +
 .../Support/BitArrayExtensions.cs               |    4 +
 src/Lucene.Net.Core/Support/BitSet.cs           |   17 +
 src/Lucene.Net.Core/Support/Class1.cs           |    8 +
 src/Lucene.Net.Core/Util/OpenBitSet.cs          |  138 ++-
 src/Lucene.Net.Java/Check.cs                    |   60 +
 src/Lucene.Net.Java/Lang/Int.cs                 |   24 +
 src/Lucene.Net.Java/Lang/Long.cs                |  153 +++
 src/Lucene.Net.Java/Lang/String.cs              |  123 ++
 src/Lucene.Net.Java/Lucene.Net.Java.csproj      |   60 +
 src/Lucene.Net.Java/Lucene.Net.Java.kproj       |   56 +
 src/Lucene.Net.Java/Properties/AssemblyInfo.cs  |   21 +
 src/Lucene.Net.Java/Readme.md                   |   16 +
 src/Lucene.Net.Java/Util/Arrays.cs              |   37 +
 src/Lucene.Net.Java/Util/DualPivotQuicksort.cs  | 1090 ++++++++++++++++++
 src/Lucene.Net.Java/Util/InsertionSort.cs       |   68 ++
 src/Lucene.Net.Java/default.ruleset             |   87 ++
 src/Lucene.Net.Java/packages.config             |    4 +
 src/Lucene.Net.Java/project.json                |   20 +
 .../Lucene.Net.Core.Tests.csproj                |   11 +-
 .../Util/BaseSorterTestCase.cs                  |    6 +-
 .../Lucene.Net.Core.Tests/Util/TestBroadWord.cs |   11 +-
 .../Util/TestByteArrayRef.cs                    |    8 +-
 .../Util/TestByteBlockPool.cs                   |   10 +-
 test/Lucene.Net.Core.Tests/Util/TestBytesRef.cs |    2 +-
 test/Lucene.Net.Core.Tests/Util/TestCharsRef.cs |   16 +-
 .../Util/TestOpenBitSet.cs                      |  439 +++++++
 .../Util/TestWeakIdentityMap.cs                 |    8 +-
 .../Lucene.Net.Java.Tests.csproj                |   83 ++
 .../Properties/AssemblyInfo.cs                  |   30 +
 .../Util/InsertionSortTests.cs                  |   71 ++
 .../Lucene.Net.Java.Tests/Util/SortTestClass.cs |   39 +
 test/Lucene.Net.Java.Tests/packages.config      |   27 +
 test/Lucene.Net.Java.Tests/project.json         |   37 +
 .../CategoryAttribute.cs                        |   44 +
 .../ExtensionMethods.cs                         |   40 +
 .../Lucene.Net.TestFramework.Core.csproj        |   71 ++
 .../NightlyAttribute.cs                         |   18 +
 .../PerformanceAttribute.cs                     |   17 +
 .../Properties/AssemblyInfo.cs                  |   30 +
 .../RandomExtensions.cs                         |   30 +
 test/Lucene.Net.TestFramework.Core/Settings.cs  |   16 +
 .../TestAttribute.cs                            |   30 +
 test/Lucene.Net.TestFramework.Core/TestClass.cs |  226 ++++
 .../TicketAttribute.cs                          |   52 +
 .../packages.config                             |   27 +
 test/Lucene.Net.TestFramework.Core/project.json |   34 +
 .../Lucene.Net.TestFramework.csproj             |   17 +-
 .../Random/RandomExtensions.cs                  |    7 +-
 .../Util/BaseDocIdSetTestCase.cs                |  226 ++++
 .../Util/ExtensionMethods.cs                    |   41 -
 .../Util/LuceneTestCase.cs                      |  225 +---
 .../Util/TestAttribute.cs                       |  137 ---
 55 files changed, 3593 insertions(+), 504 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/Lucene.vs2013.sln
----------------------------------------------------------------------
diff --git a/Lucene.vs2013.sln b/Lucene.vs2013.sln
index 9170178..f2c2d53 100644
--- a/Lucene.vs2013.sln
+++ b/Lucene.vs2013.sln
@@ -13,6 +13,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.TestFramework",
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Core.Tests", "test\Lucene.Net.Core.Tests\Lucene.Net.Core.Tests.csproj", "{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Java", "src\Lucene.Net.Java\Lucene.Net.Java.csproj", "{4AD3FE35-AA0A-4C3C-A043-12711625DF74}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Java.Tests", "test\Lucene.Net.Java.Tests\Lucene.Net.Java.Tests.csproj", "{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.TestFramework.Core", "test\Lucene.Net.TestFramework.Core\Lucene.Net.TestFramework.Core.csproj", "{438B8450-E93A-425F-9A9B-11D02E8896D5}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -31,6 +37,18 @@ Global
 		{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4AD3FE35-AA0A-4C3C-A043-12711625DF74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4AD3FE35-AA0A-4C3C-A043-12711625DF74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4AD3FE35-AA0A-4C3C-A043-12711625DF74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4AD3FE35-AA0A-4C3C-A043-12711625DF74}.Release|Any CPU.Build.0 = Release|Any CPU
+		{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7}.Release|Any CPU.Build.0 = Release|Any CPU
+		{438B8450-E93A-425F-9A9B-11D02E8896D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{438B8450-E93A-425F-9A9B-11D02E8896D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{438B8450-E93A-425F-9A9B-11D02E8896D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{438B8450-E93A-425F-9A9B-11D02E8896D5}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -39,5 +57,8 @@ Global
 		{AD8901C0-209D-4132-80AA-257DBACEECB4} = {CD84C1EF-B845-4914-A9DD-D0F9ACC7DE6F}
 		{F0D68FEA-B118-43B6-B760-3FB75CDE766D} = {4B0484AA-03E4-47A5-9989-AC42DDE1E06B}
 		{C879C7A6-FBE5-4F22-B363-A4356C7B8E76} = {4B0484AA-03E4-47A5-9989-AC42DDE1E06B}
+		{4AD3FE35-AA0A-4C3C-A043-12711625DF74} = {CD84C1EF-B845-4914-A9DD-D0F9ACC7DE6F}
+		{06FE85CA-11BA-4E69-81B4-1FA6E031E0B7} = {4B0484AA-03E4-47A5-9989-AC42DDE1E06B}
+		{438B8450-E93A-425F-9A9B-11D02E8896D5} = {4B0484AA-03E4-47A5-9989-AC42DDE1E06B}
 	EndGlobalSection
 EndGlobal

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/Lucene.vs2013.sln.GhostDoc.user.dic
----------------------------------------------------------------------
diff --git a/Lucene.vs2013.sln.GhostDoc.user.dic b/Lucene.vs2013.sln.GhostDoc.user.dic
index 117fab3..7da4c3e 100644
--- a/Lucene.vs2013.sln.GhostDoc.user.dic
+++ b/Lucene.vs2013.sln.GhostDoc.user.dic
@@ -1,3 +1,4 @@
 indices
 init
+Quicksort
 Subword

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Core/Lucene.Net.Core.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.Core.csproj b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
index 26f3b3b..3d235a3 100644
--- a/src/Lucene.Net.Core/Lucene.Net.Core.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
@@ -62,6 +62,9 @@
     <Compile Include="Check.cs" />
     <Compile Include="Support\ArrayExtensionMethods.cs" />
     <Compile Include="Support\AtomicReferenceArray.cs" />
+    <Compile Include="Support\BitArrayExtensions.cs" />
+    <Compile Include="Support\BitSet.cs" />
+    <Compile Include="Support\Class1.cs" />
     <Compile Include="Support\DeepCloneNotSupportedException.cs" />
     <Compile Include="Support\EnumUtil.cs" />
     <Compile Include="Support\HashMap.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Core/Support/BitArrayExtensions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BitArrayExtensions.cs b/src/Lucene.Net.Core/Support/BitArrayExtensions.cs
new file mode 100644
index 0000000..0174a00
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/BitArrayExtensions.cs
@@ -0,0 +1,4 @@
+
+
+
+

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Core/Support/BitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/BitSet.cs b/src/Lucene.Net.Core/Support/BitSet.cs
new file mode 100644
index 0000000..473ce48
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/BitSet.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Lucene.Net.Support
+{
+    public class BitSet
+    {
+        private const int BITS_PER_WORD = 1 << 6;
+        private const ulong WORD_MASK = 0xffffffffffffffffL;
+
+
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Core/Support/Class1.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/Class1.cs b/src/Lucene.Net.Core/Support/Class1.cs
new file mode 100644
index 0000000..37fc23b
--- /dev/null
+++ b/src/Lucene.Net.Core/Support/Class1.cs
@@ -0,0 +1,8 @@
+
+
+namespace Lucene.Net.Support
+{
+    class Class1
+    {
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Core/Util/OpenBitSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/OpenBitSet.cs b/src/Lucene.Net.Core/Util/OpenBitSet.cs
index 7a176e3..2a0bca0 100644
--- a/src/Lucene.Net.Core/Util/OpenBitSet.cs
+++ b/src/Lucene.Net.Core/Util/OpenBitSet.cs
@@ -131,11 +131,21 @@ namespace Lucene.Net.Util
             this.numBits = wordLength * 64;
         }
 
+        /// <summary>
+        /// Provides a <seealso cref="DocIdSetIterator" /> to access the set.
+        /// this implementation can return <code>null</code> if there
+        /// are no docs that match.
+        /// </summary>
+        /// <returns>DocIdSetIterator.</returns>
         public override DocIdSetIterator GetIterator()
         {
             return new OpenBitSetIterator(bits, this.wordLength);
         }
 
+        /// <summary>
+        /// Gets the bits.
+        /// </summary>
+        /// <returns>IBits.</returns>
         public override IBits GetBits()
         {
             return this;
@@ -233,8 +243,8 @@ namespace Lucene.Net.Util
             }
 
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            return (bits[i] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            return (bits[i] & bitMask) != 0;
         }
 
         /// <summary>
@@ -248,8 +258,8 @@ namespace Lucene.Net.Util
             // signed shift will keep a negative index and force an
             // array-index-out-of-bounds-exception, removing the need for an explicit check.
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            return (bits[i] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            return (bits[i] & bitMask) != 0;
         }
 
         /// <summary>
@@ -263,8 +273,8 @@ namespace Lucene.Net.Util
                 return false;
             }
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            return (bits[i] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            return (bits[i] & bitMask) != 0;
         }
 
         /// <summary>
@@ -276,8 +286,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int i = (int)(index >> 6); // div 64
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            return (bits[i] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            return (bits[i] & bitMask) != 0;
         }
 
         /*
@@ -288,7 +298,7 @@ namespace Lucene.Net.Util
           return ((bits[i]>>>bit) & 0x01) != 0;
           // this does a long shift and a bittest (on x86) vs
           // a long shift, and a long AND, (the test for zero is prob a no-op)
-          // testing on a P4 indicates this is slower than (bits[i] & bitmask) != 0;
+          // testing on a P4 indicates this is slower than (bits[i] & bitMask) != 0;
         }
         */
 
@@ -319,8 +329,8 @@ namespace Lucene.Net.Util
         {
             int wordNum = ExpandingWordNum(index);
             int bit = (int)index & 0x3f;
-            long bitmask = 1L << bit;
-            bits[wordNum] |= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] |= bitMask;
         }
 
         /// <summary>
@@ -332,8 +342,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = index >> 6; // div 64
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] |= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] |= bitMask;
         }
 
         /// <summary>
@@ -345,8 +355,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = (int)(index >> 6);
             int bit = (int)index & 0x3f;
-            long bitmask = 1L << bit;
-            bits[wordNum] |= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] |= bitMask;
         }
 
         /// <summary>
@@ -367,18 +377,18 @@ namespace Lucene.Net.Util
             // word to be changed.
             int endWord = ExpandingWordNum(endIndex - 1);
 
-            long startmask = -1L << (int)startIndex;
-            long endmask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
+            long startMask = -1L << (int)startIndex;
+            long endMask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
 
             if (startWord == endWord)
             {
-                bits[startWord] |= (startmask & endmask);
+                bits[startWord] |= (startMask & endMask);
                 return;
             }
 
-            bits[startWord] |= startmask;
+            bits[startWord] |= startMask;
             bits.Fill(startWord + 1, endWord, -1L);
-            bits[endWord] |= endmask;
+            bits[endWord] |= endMask;
         }
 
         protected internal virtual int ExpandingWordNum(long index)
@@ -400,8 +410,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = index >> 6;
             int bit = index & 0x03f;
-            long bitmask = 1L << bit;
-            bits[wordNum] &= ~bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] &= ~bitMask;
             // hmmm, it takes one more instruction to clear than it does to set... any
             // way to work around this?  If there were only 63 bits per word, we could
             // use a right shift of 10111111...111 in binary to position the 0 in the
@@ -420,8 +430,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = (int)(index >> 6); // div 64
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] &= ~bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] &= ~bitMask;
         }
 
         /// <summary>
@@ -434,8 +444,8 @@ namespace Lucene.Net.Util
                 return;
             }
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] &= ~bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] &= ~bitMask;
         }
 
         /// <summary>
@@ -461,26 +471,26 @@ namespace Lucene.Net.Util
             int endWord = ((endIndex - 1) >> 6);
 
             //LUCENE TO-DO
-            long startmask = -1L << startIndex;
-            long endmask = -(int)((uint)1L >> -endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
+            long startMask = -1L << startIndex;
+            long endMask = -(int)((uint)1L >> -endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
 
             // invert masks since we are clearing
-            startmask = ~startmask;
-            endmask = ~endmask;
+            startMask = ~startMask;
+            endMask = ~endMask;
 
             if (startWord == endWord)
             {
-                bits[startWord] &= (startmask | endmask);
+                bits[startWord] &= (startMask | endMask);
                 return;
             }
 
-            bits[startWord] &= startmask;
+            bits[startWord] &= startMask;
 
             int middle = Math.Min(wordLength, endWord);
             bits.Fill(startWord + 1, middle, 0L);
             if (endWord < wordLength)
             {
-                bits[endWord] &= endmask;
+                bits[endWord] &= endMask;
             }
         }
 
@@ -507,26 +517,26 @@ namespace Lucene.Net.Util
             int endWord = (int)((endIndex - 1) >> 6);
 
             //LUCENE TO-DO
-            long startmask = -1L << (int)startIndex;
-            long endmask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
+            long startMask = -1L << (int)startIndex;
+            long endMask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
 
             // invert masks since we are clearing
-            startmask = ~startmask;
-            endmask = ~endmask;
+            startMask = ~startMask;
+            endMask = ~endMask;
 
             if (startWord == endWord)
             {
-                bits[startWord] &= (startmask | endmask);
+                bits[startWord] &= (startMask | endMask);
                 return;
             }
 
-            bits[startWord] &= startmask;
+            bits[startWord] &= startMask;
 
             int middle = Math.Min(wordLength, endWord);
             bits.Fill(startWord + 1, middle, 0L);
             if (endWord < wordLength)
             {
-                bits[endWord] &= endmask;
+                bits[endWord] &= endMask;
             }
         }
 
@@ -539,9 +549,9 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = index >> 6; // div 64
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bool val = (bits[wordNum] & bitmask) != 0;
-            bits[wordNum] |= bitmask;
+            long bitMask = 1L << bit;
+            bool val = (bits[wordNum] & bitMask) != 0;
+            bits[wordNum] |= bitMask;
             return val;
         }
 
@@ -554,9 +564,9 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = (int)(index >> 6); // div 64
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bool val = (bits[wordNum] & bitmask) != 0;
-            bits[wordNum] |= bitmask;
+            long bitMask = 1L << bit;
+            bool val = (bits[wordNum] & bitMask) != 0;
+            bits[wordNum] |= bitMask;
             return val;
         }
 
@@ -569,8 +579,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = index >> 6; // div 64
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] ^= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] ^= bitMask;
         }
 
         /// <summary>
@@ -582,8 +592,8 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = (int)(index >> 6); // div 64
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] ^= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] ^= bitMask;
         }
 
         /// <summary>
@@ -592,8 +602,8 @@ namespace Lucene.Net.Util
         {
             int wordNum = ExpandingWordNum(index);
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] ^= bitmask;
+            long bitMask = 1L << bit;
+            bits[wordNum] ^= bitMask;
         }
 
         /// <summary>
@@ -605,9 +615,9 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = index >> 6; // div 64
             int bit = index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] ^= bitmask;
-            return (bits[wordNum] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            bits[wordNum] ^= bitMask;
+            return (bits[wordNum] & bitMask) != 0;
         }
 
         /// <summary>
@@ -619,9 +629,9 @@ namespace Lucene.Net.Util
             Debug.Assert(index >= 0 && index < numBits);
             int wordNum = (int)(index >> 6); // div 64
             int bit = (int)index & 0x3f; // mod 64
-            long bitmask = 1L << bit;
-            bits[wordNum] ^= bitmask;
-            return (bits[wordNum] & bitmask) != 0;
+            long bitMask = 1L << bit;
+            bits[wordNum] ^= bitMask;
+            return (bits[wordNum] & bitMask) != 0;
         }
 
         /// <summary>
@@ -650,23 +660,23 @@ namespace Lucene.Net.Util
            
 
             //LUCENE TO-DO
-            long startmask = -1L << (int)startIndex;
-            long endmask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
+            long startMask = -1L << (int)startIndex;
+            long endMask = -(int)((uint)1L >> (int)-endIndex); // 64-(endIndex&0x3f) is the same as -endIndex due to wrap
 
             if (startWord == endWord)
             {
-                bits[startWord] ^= (startmask & endmask);
+                bits[startWord] ^= (startMask & endMask);
                 return;
             }
 
-            bits[startWord] ^= startmask;
+            bits[startWord] ^= startMask;
 
             for (int i = startWord + 1; i < endWord; i++)
             {
                 bits[i] = ~bits[i];
             }
 
-            bits[endWord] ^= endmask;
+            bits[endWord] ^= endMask;
         }
 
         /*
@@ -922,7 +932,7 @@ namespace Lucene.Net.Util
         public object Clone(bool deepCopy = true)
         {
             if (!deepCopy) 
-                return new OpenBitSet((long[])this.bits.Copy(), this.wordLength);
+                return new OpenBitSet(this.bits.Copy(), this.wordLength);
             
             try
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Check.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Check.cs b/src/Lucene.Net.Java/Check.cs
new file mode 100644
index 0000000..4439dac
--- /dev/null
+++ b/src/Lucene.Net.Java/Check.cs
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+namespace Java
+{
+    using System;
+    using System.Collections.Generic;
+
+    internal class Check
+    {
+
+        internal static void NotNull<T>(string argument, T value, string message = null, params  object[] args) where T : class 
+        {
+            if (value == null)
+            {
+                if (message == null)
+                    message = string.Format("The parameter, {0}, must not be null.", argument);
+
+                if (args != null && args.Length > 0)
+                    message = string.Format(message, args);
+
+
+                throw new ArgumentNullException(argument, message);
+            }
+        }
+
+        internal static void Range<T>(string argument, IList<T> value, int start, int count)
+        {
+            if(start < 0)
+                throw new ArgumentOutOfRangeException("start", "The parameter, start, must be 0 or greater.");
+
+            if(start >= value.Count)
+                throw new ArgumentOutOfRangeException("start", string.Format("The parameter, start, must not be equal or greater than {0}'s length.", argument));
+
+            if (count < 0)
+                throw new ArgumentOutOfRangeException("count", "The parameter, count, must be 0 or greater.");
+            
+            if (count > value.Count)
+                throw new ArgumentOutOfRangeException("count", string.Format("The parameter, count, must not be greater than {0}'s length.", argument));
+
+            if(start + count > value.Count)
+                throw new ArgumentOutOfRangeException("value,count", string.Format("The sum of start and count must not be greater than {0}'s length", argument));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Lang/Int.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Lang/Int.cs b/src/Lucene.Net.Java/Lang/Int.cs
new file mode 100644
index 0000000..abf5248
--- /dev/null
+++ b/src/Lucene.Net.Java/Lang/Int.cs
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Lang
+{
+    public class Int
+    {
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Lang/Long.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Lang/Long.cs b/src/Lucene.Net.Java/Lang/Long.cs
new file mode 100644
index 0000000..c532c84
--- /dev/null
+++ b/src/Lucene.Net.Java/Lang/Long.cs
@@ -0,0 +1,153 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Lang
+{
+    using System;
+
+    public class Long
+    {
+        public const int SIZE = 64;
+
+        private static class DeBruijn64
+        {
+            private static readonly int[] POSITIONS =
+            {
+                0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28,
+                62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11,
+                63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10,
+                51, 25, 36, 32, 60, 20, 57, 16, 50, 31, 19, 15, 30, 14, 13, 12
+            };
+
+            public static int Position(long value)
+            {
+                var v = value;
+
+                return POSITIONS[(v & -v) * 0x022fdd63cc95386d >> 58];
+            }
+        }
+
+
+      
+
+
+        /// <summary>
+        /// Returns the leading zeros from the value.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        /// <returns>System.Int32.</returns>
+        public static int NumberOfLeadingZeros(long value)
+        {
+            return (int)NumberOfLeadingZeros((ulong)value);
+        }
+
+        /// <summary>
+        /// Returns the leading zeros from the value.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        /// <returns>System.UInt32.</returns>
+        [CLSCompliant(false)]
+        public static uint NumberOfLeadingZeros(ulong value)
+        {
+            if (value == 0)
+                return 64;
+            uint number = 1;
+            var test = value >> 32;
+
+
+            if (test == 0)
+            {
+                number += 32;
+                test = (uint)value;
+            }
+
+            if (test >> 16 == 0)
+            {
+                number += 16;
+                test <<= 16;
+            }
+
+            if (test >> 24 == 0)
+            {
+                number += 8;
+                test <<= 8;
+            }
+
+            if (test >> 28 == 0)
+            {
+                number += 4;
+                test <<= 4;
+            }
+
+            if (test >> 30 == 0)
+            {
+                number += 2;
+                test <<= 2;
+            }
+            number -= (uint)test >> 31;
+
+            return number;
+        }
+
+        // ReSharper disable once CSharpWarnings::CS1584
+        /// <summary>
+        /// Returns the number of trailing zeros. i.e 100 has two trailing zeros.
+        /// </summary>
+        /// <param name="value">The value to be inspected for trailing zeros.</param>
+        /// <remarks>
+        ///     <para>
+        ///         We're using the De Bruijn sequences based upon the various bit twiddling hacks found in 
+
+        ///         an online paper stanford <see href="https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightMultLookup" />
+        ///     </para>
+        ///     <para>
+        ///          It should be faster than Java's native 
+        ///          <see href="http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/java/lang/Integer.java#Integer.numberOfTrailingZeros%28int%29">
+        ///          Long.numberOfTrailingZeros
+        ///          </see> which uses the binary search method of finding trailing zeros.  
+        ///     </para>
+        /// </remarks>
+        /// <returns>The number of trailing zeros.</returns>
+        public static int NumberOfTrailingZeros(long value)
+        {
+            return DeBruijn64.Position(value);
+        }
+
+        public static long RotateLeft(long value, int shift)
+        {
+            return (long)RotateLeft((ulong) value, shift);
+        }
+
+        [CLSCompliant(false)]
+        public static ulong RotateLeft(ulong value, int shift)
+        {
+            return (value << shift) | (value >> -shift);
+        }
+
+
+        public static long RotateRight(long value, int shift)
+        {
+            return (long)RotateRight((ulong) value, shift);
+        }
+
+        [CLSCompliant(false)]
+        public static ulong RotateRight(ulong value, int shift)
+        {
+            return (value >> shift) | (value << -shift);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Lang/String.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Lang/String.cs b/src/Lucene.Net.Java/Lang/String.cs
new file mode 100644
index 0000000..c27d07a
--- /dev/null
+++ b/src/Lucene.Net.Java/Lang/String.cs
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Lang
+{
+    using System;
+    using System.Collections.Generic;
+
+    public class String : IEnumerable<char>
+    {
+        private readonly char[] value;
+
+
+        public String()
+        {
+            this.value = new char[0];
+        }
+
+        public String(string value)
+        {
+            this.value = value.ToCharArray();
+        }
+
+        public String(char[] value)
+        {
+            this.value = value;
+        }
+
+        public static explicit operator String(string value)
+        {
+            return new String(value);
+        }
+
+        public static explicit operator String(char[] value)
+        {
+            return new String(value);
+        }
+
+
+        public int Length
+        {
+            get { return this.value.Length; }
+        }
+
+        IEnumerator<char> IEnumerable<char>.GetEnumerator()
+        {
+            return new CharEnumerator(this.value);
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return new CharEnumerator(this.value);
+        }
+
+
+        private class CharEnumerator : IEnumerator<char>
+        {
+            private char[] values;
+            private int position;
+
+            public CharEnumerator(char[] values)
+            {
+                this.values = values;
+                this.position = -1;
+            }
+
+            public char Current
+            {
+                get { return this.values[this.position]; }
+            }
+
+            object System.Collections.IEnumerator.Current
+            {
+                get { return this.Current; }
+            }
+
+            public bool MoveNext()
+            {
+                return this.position++ < this.values.Length;
+
+            }
+
+            public void Reset()
+            {
+                this.position = -1;
+            }
+
+            public void Dispose()
+            {
+                GC.SuppressFinalize(this);
+                this.Dispose(true);
+            }
+
+            private void Dispose(bool disposing)
+            {
+                if(!disposing)
+                    return;
+
+                this.values = null;
+            }
+
+            ~CharEnumerator()
+            {
+                this.Dispose(false);
+            }
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Lucene.Net.Java.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Lucene.Net.Java.csproj b/src/Lucene.Net.Java/Lucene.Net.Java.csproj
new file mode 100644
index 0000000..2a13128
--- /dev/null
+++ b/src/Lucene.Net.Java/Lucene.Net.Java.csproj
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{4AD3FE35-AA0A-4C3C-A043-12711625DF74}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Java</RootNamespace>
+    <AssemblyName>Lucene.Net.Java</AssemblyName>
+    <DefaultLanguage>en-US</DefaultLanguage>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <!-- A reference to the entire .NET Framework is automatically included -->
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Check.cs" />
+    <Compile Include="Lang\Int.cs" />
+    <Compile Include="Lang\Long.cs" />
+    <Compile Include="Lang\String.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Util\Arrays.cs" />
+    <Compile Include="Util\DualPivotQuicksort.cs" />
+    <Compile Include="Util\InsertionSort.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Readme.md" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Lucene.Net.Java.kproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Lucene.Net.Java.kproj b/src/Lucene.Net.Java/Lucene.Net.Java.kproj
new file mode 100644
index 0000000..af2ce9d
--- /dev/null
+++ b/src/Lucene.Net.Java/Lucene.Net.Java.kproj
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">12.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+  </PropertyGroup>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+  </PropertyGroup>
+  <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.Props" Condition="'$(VSToolsPath)' != ''" />
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>caf32bea-5560-4e4a-a81f-11aa377f9929</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <RootNamespace>Java</RootNamespace>
+  </PropertyGroup>
+  <PropertyGroup Condition="$(OutputType) == 'Console'">
+    <DebuggerFlavor>ConsoleDebugger</DebuggerFlavor>
+  </PropertyGroup>
+  <PropertyGroup Condition="$(OutputType) == 'Web'">
+    <DebuggerFlavor>WebDebugger</DebuggerFlavor>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'" Label="Configuration">
+  </PropertyGroup>
+  <PropertyGroup>
+    <SchemaVersion>2.0</SchemaVersion>
+  </PropertyGroup>
+  <ItemGroup>
+    <Content Include="default.ruleset" />
+    <Content Include="packages.config" />
+    <Content Include="project.json" />
+  </ItemGroup>
+  <ItemGroup>
+  </ItemGroup>
+  <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Properties/AssemblyInfo.cs b/src/Lucene.Net.Java/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..42c05a0
--- /dev/null
+++ b/src/Lucene.Net.Java/Properties/AssemblyInfo.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+#if PORTABLE
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyTitle("Lucene.Net.Java")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Lucene.Net.Java")]
+[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+#endif
+
+[assembly: CLSCompliant(true)]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Readme.md
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Readme.md b/src/Lucene.Net.Java/Readme.md
new file mode 100644
index 0000000..c24d559
--- /dev/null
+++ b/src/Lucene.Net.Java/Readme.md
@@ -0,0 +1,16 @@
+# Lucene.Net.Java
+
+This project is a spin off of the <strong>Support</strong> folder of Lucene.Net. There is enough low level functionality
+that the standard Java library has that is not found in .NET to warrant a separate assembly.   
+
+Creating a separate project will let the .NET community leverage the functionality 
+without a required dependency to all of Lucene.Net. There is most likely similar 
+functionality in IVKM.NET, however, it's JDK falls under GPL v2 which is not compatible with 
+the Apache 2.0 License.  
+
+The root namespace of the projeect is <strong>Java</strong> and not <strong>Lucene.Net.Java</strong>, so 
+that its easier to convert code with the namespaces. 
+
+There will still be differences between this library and the Java implementation. The goal is to match the Java API 
+when possible while still using the correct .NET idioms.  There are also differences in runtimes that will allow for 
+a simplified API with generics.  [Comparing Generics Java and C#](http://www.jprl.com/Blog/archive/development/2007/Aug-31.html)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Util/Arrays.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Util/Arrays.cs b/src/Lucene.Net.Java/Util/Arrays.cs
new file mode 100644
index 0000000..083f6f0
--- /dev/null
+++ b/src/Lucene.Net.Java/Util/Arrays.cs
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Util
+{
+    using System;
+    using System.Collections.Generic;
+
+    public static class Arrays
+    {
+
+        public static void Fill<T>(IList<T> list, Func<T> factory)
+        {
+            Fill(list, 0, list.Count, factory);
+        }
+
+        public static void Fill<T>(IList<T> list, int start, int count, Func<T> factory)
+        {
+            for (var i = start; i < count; i++)
+                list[i] = factory();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Util/DualPivotQuicksort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Util/DualPivotQuicksort.cs b/src/Lucene.Net.Java/Util/DualPivotQuicksort.cs
new file mode 100644
index 0000000..d880c1a
--- /dev/null
+++ b/src/Lucene.Net.Java/Util/DualPivotQuicksort.cs
@@ -0,0 +1,1090 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Util
+{
+    using System;
+    using System.Collections.Generic;
+
+    // ReSharper disable CSharpWarnings::CS1574
+    /// <summary>
+    /// A .NET implementation of Valdimir Yaroslavskiy's Dual-Pivot Quicksort
+    /// </summary>
+    /// <remarks>
+    ///     <para>
+    ///         The overloaded methods are to avoid the extra compare operations for 
+    ///         known value types: <see cref="short" />,<see cref="int" />, <see cref="long"/>
+    ///         <see cref="byte" />, and <see cref="char" />.  
+    ///         <see cref="DualPivotQuicksort.Sort(IComparable{T})"/> can be used for all other types
+    ///         that implement <see cref="IComparable{T}"/>.
+    ///     </para>
+    /// </remarks>
+    // ReSharper disable FunctionRecursiveOnAllPaths
+    public class DualPivotQuicksort
+    {
+        private const int DIST_SIZE = 13;
+
+
+
+        private static void Swap<T>(IList<T> array, int left, int right)
+        {
+            var reference = array[left];
+            array[left] = array[right];
+            array[right] = reference;
+        }
+
+        public static IList<int> Sort(IList<int> list)
+        {
+            Check.NotNull("list", list);
+
+            PerformSort(list, 0, list.Count);
+
+            return list;
+        }
+
+        public static IList<int> Sort(IList<int> list, int start, int count)
+        {
+            Check.NotNull("list", list);
+            Check.Range("list", list, start, count);
+
+            PerformSort(list, start, count);
+
+            return list;
+        }
+
+        private static void PerformSort(IList<int> array, int left, int right)
+        {
+            int length = right - left,
+                x,
+                pivot1,
+                pivot2;
+
+           
+
+            int sixth = length/6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (array[m1] > array[m2])
+                Swap(array, m1, m2);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            if (array[m1] > array[m3])
+                Swap(array, m1, m3);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m1] > array[m4])
+                Swap(array, m2, m4);
+
+            if (array[m3] > array[m4])
+                Swap(array, m3, m4);
+
+            if (array[m2] > array[m5])
+                Swap(array, m2, m5);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            var pivotsAreDifferent = pivot1 != pivot2;
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                        continue;
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x == pivot2)
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (x != pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+
+
+        public static IList<char> Sort(IList<char> list)
+        {
+            Check.NotNull("list", list);
+
+            PerformSort(list, 0, list.Count);
+
+            return list;
+        }
+
+        public static IList<char> Sort(IList<char> list, int start, int count)
+        {
+            Check.NotNull("list", list);
+            Check.Range("list", list, start, count);
+
+            PerformSort(list, start, count);
+
+            return list;
+        }
+
+        private static void PerformSort(IList<char> array, int left, int right)
+        {
+            int length = right - left;
+            char x,
+                pivot1,
+                pivot2;
+
+          
+
+            int sixth = length/6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (array[m1] > array[m2])
+                Swap(array, m1, m2);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            if (array[m1] > array[m3])
+                Swap(array, m1, m3);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m1] > array[m4])
+                Swap(array, m2, m4);
+
+            if (array[m3] > array[m4])
+                Swap(array, m3, m4);
+
+            if (array[m2] > array[m5])
+                Swap(array, m2, m5);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            bool pivotsAreDifferent = pivot1 != pivot2;
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                        continue;
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x == pivot2)
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (x != pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+
+        public static IList<short> Sort(IList<short> list)
+        {
+            Check.NotNull("list", list);
+            PerformSort(list, 0, list.Count);
+            return list;
+        }
+
+        public static IList<short> Sort(IList<short> list, int start, int count)
+        {
+            Check.NotNull("list", list);
+            Check.Range("list", list, start, count);
+            PerformSort(list, start, count);
+            return list;
+        }
+
+        private static void PerformSort(IList<short> array, int left, int right)
+        {
+            var length = right - left;
+            short x,
+                pivot1,
+                pivot2;
+
+           
+
+            int sixth = length/6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (array[m1] > array[m2])
+                Swap(array, m1, m2);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            if (array[m1] > array[m3])
+                Swap(array, m1, m3);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m1] > array[m4])
+                Swap(array, m2, m4);
+
+            if (array[m3] > array[m4])
+                Swap(array, m3, m4);
+
+            if (array[m2] > array[m5])
+                Swap(array, m2, m5);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            bool pivotsAreDifferent = pivot1 != pivot2;
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                        continue;
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x == pivot2)
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (x != pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+
+
+        public static IList<byte> Sort(IList<byte> list, int start, int count)
+        {
+            Check.NotNull("list", list);
+            Check.Range("list", list, start, count);
+
+            PerformSort(list, start, count);
+
+            return list;
+        }
+
+        internal static void PerformSort(IList<byte> array, int left, int right)
+        {
+            int length = right - left;
+            byte x,
+                pivot1,
+                pivot2;
+
+            
+
+            int sixth = length/6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (array[m1] > array[m2])
+                Swap(array, m1, m2);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            if (array[m1] > array[m3])
+                Swap(array, m1, m3);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m1] > array[m4])
+                Swap(array, m2, m4);
+
+            if (array[m3] > array[m4])
+                Swap(array, m3, m4);
+
+            if (array[m2] > array[m5])
+                Swap(array, m2, m5);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            bool pivotsAreDifferent = pivot1 != pivot2;
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                        continue;
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x == pivot2)
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (x != pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+
+        public static long[] Sort(long[] array)
+        {
+            Check.NotNull("array", array);
+            PerformSort(array, 0, array.Length);
+            return array;
+        }
+
+        public static long[] Sort(long[] array, int start, int count)
+        {
+            Check.NotNull("array", array);
+            Check.Range("array", array, start, count);
+            PerformSort(array, start, count);
+            return array;
+        }
+
+
+        internal static void PerformSort(long[] array, int left, int right)
+        {
+            int length = right - left;
+            long x,
+                pivot1,
+                pivot2;
+
+           
+
+            int sixth = length/6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (array[m1] > array[m2])
+                Swap(array, m1, m2);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            if (array[m1] > array[m3])
+                Swap(array, m1, m3);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m1] > array[m4])
+                Swap(array, m2, m4);
+
+            if (array[m3] > array[m4])
+                Swap(array, m3, m4);
+
+            if (array[m2] > array[m5])
+                Swap(array, m2, m5);
+
+            if (array[m2] > array[m3])
+                Swap(array, m2, m3);
+
+            if (array[m4] > array[m5])
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            bool pivotsAreDifferent = pivot1 != pivot2;
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                        continue;
+
+                    if (x < pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x > pivot2)
+                    {
+                        while (array[great] > pivot2 && k < great)
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (x >= pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x == pivot1)
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x == pivot2)
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (x != pivot1)
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+
+        private static bool LessThan<T>(T left, T right) where T : IComparable<T>
+        {
+            return left.CompareTo(right) < 0;
+        }
+
+        private static bool GreaterThan<T>(T left, T right) where T : IComparable<T>
+        {
+            return left.CompareTo(right) > 0;
+        }
+
+        private static bool GreaterThanOrEqualTo<T>(T left, T right) where T : IComparable<T>
+        {
+            var compare = left.CompareTo(right);
+            return compare > 0 || compare == 0;
+        }
+
+        public static IList<T> Sort<T>(IList<T> list) where T: IComparable<T>
+        {
+            Check.NotNull("array", list);
+            PerformSort(list, 0, list.Count);
+
+            return list;
+        }
+
+        public static IList<T> Sort<T>(IList<T> list, int start, int count)  where T: IComparable<T> 
+        {
+            Check.NotNull("array", list);
+            Check.Range("array", list, start, count);
+            PerformSort(list, start, count);
+
+            return list;
+        }
+
+
+        internal static void PerformSort<T>(IList<T> array, int left, int right) where T: IComparable<T> 
+        {
+            int length = right - left;
+            T x, pivot2, pivot1;
+
+            
+
+            int sixth = length / 6,
+                m1 = left + sixth,
+                m2 = m1 + sixth,
+                m3 = m2 + sixth,
+                m4 = m3 + sixth,
+                m5 = m4 + sixth;
+
+            if (GreaterThan(array[m1] , array[m2]))
+                Swap(array, m1, m2);
+
+            if (GreaterThan(array[m4] , array[m5]))
+                Swap(array, m4, m5);
+
+            if (GreaterThan(array[m1] , array[m3]))
+                Swap(array, m1, m3);
+
+            if (GreaterThan(array[m2], array[m3]))
+                Swap(array, m2, m3);
+
+            if (GreaterThan(array[m1], array[m4]))
+                Swap(array, m2, m4);
+
+            if (GreaterThan(array[m3], array[m4]))
+                Swap(array, m3, m4);
+
+            if (GreaterThan(array[m2], array[m5]))
+                Swap(array, m2, m5);
+
+            if (GreaterThan(array[m2],array[m3]))
+                Swap(array, m2, m3);
+
+            if (GreaterThan(array[m4], array[m5]))
+                Swap(array, m4, m5);
+
+            pivot1 = array[m2];
+            pivot2 = array[m4];
+
+            bool pivotsAreDifferent = !pivot1.Equals(pivot2);
+
+            array[m2] = array[left];
+            array[m4] = array[right];
+
+            int less = left + 1,
+                great = right - 1;
+
+            if (pivotsAreDifferent)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (LessThan(x , pivot1))
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (GreaterThan(x , pivot2))
+                    {
+                        while (GreaterThan(array[great] , pivot2) && LessThan(k , great))
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (GreaterThanOrEqualTo(x , pivot1))
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+            else
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (LessThan(x, pivot1))
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (GreaterThan(x, pivot2))
+                    {
+                        while (GreaterThan(array[great], pivot2) && LessThan(k, great))
+                        {
+                            great--;
+                        }
+                        Swap(array, k, great--);
+
+                        if (GreaterThanOrEqualTo(x, pivot1))
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            array[left] = array[less - 1];
+            array[left - 1] = pivot1;
+
+            array[right] = array[great + 1];
+            array[great + 1] = pivot2;
+
+            PerformSort(array, left, less - 2);
+            PerformSort(array, great + 1, right);
+
+            if (!pivotsAreDifferent)
+                return;
+
+
+            if (great - less > length - DIST_SIZE)
+            {
+                for (var k = less; k <= great; k++)
+                {
+                    x = array[k];
+
+                    if (x.Equals(pivot1))
+                    {
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                    else if (x.Equals(pivot2))
+                    {
+                        array[k] = array[great];
+                        array[great--] = x;
+                        x = array[k];
+
+
+                        if (! x.Equals(pivot1))
+                            continue;
+
+                        array[k] = array[less];
+                        array[less++] = x;
+                    }
+                }
+            }
+
+            PerformSort(array, less, great);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/Util/InsertionSort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/Util/InsertionSort.cs b/src/Lucene.Net.Java/Util/InsertionSort.cs
new file mode 100644
index 0000000..5e27c58
--- /dev/null
+++ b/src/Lucene.Net.Java/Util/InsertionSort.cs
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Java.Util
+{
+    using System;
+    using System.Collections.Generic;
+
+    public static class InsertionSort
+    {
+
+      
+
+        private static void Swap<T>(IList<T> list,int left , int right )
+        {
+            var reference = list[left];
+            list[left] = list[right];
+            list[right] = reference;
+        }
+
+
+
+
+        public static IList<T> Sort<T>(IList<T> list) where T : IComparable<T>
+        {
+            Check.NotNull("list", list);
+
+            return PerformSort(list, 0, list.Count);
+        }
+
+        public static IList<T> Sort<T>(IList<T> list, int start, int count)where T: IComparable<T>
+        {
+            Check.NotNull("list", list);
+            Check.Range("list", list, start, count);
+
+            return PerformSort(list, start, count);
+        }
+
+        internal static IList<T> PerformSort<T>(IList<T> list, int start, int count) where T: IComparable<T>
+        {
+            for (var i = start + 1; i < count; i++)
+            {
+               
+                for (var j = i; j > start && list[j - 1].CompareTo(list[j]) >= 0; j--)
+                {
+                    // swap
+                    Swap(list, j - 1, j);
+                }
+            }
+
+            return list;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/default.ruleset
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/default.ruleset b/src/Lucene.Net.Java/default.ruleset
new file mode 100644
index 0000000..7770345
--- /dev/null
+++ b/src/Lucene.Net.Java/default.ruleset
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<RuleSet Name="Copy of Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set you create for your projects." ToolsVersion="14.0">
+  <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
+    <Rule Id="CA1001" Action="Warning" />
+    <Rule Id="CA1009" Action="Warning" />
+    <Rule Id="CA1016" Action="Warning" />
+    <Rule Id="CA1033" Action="Warning" />
+    <Rule Id="CA1049" Action="Warning" />
+    <Rule Id="CA1060" Action="Warning" />
+    <Rule Id="CA1061" Action="Warning" />
+    <Rule Id="CA1063" Action="Warning" />
+    <Rule Id="CA1065" Action="Warning" />
+    <Rule Id="CA1301" Action="Warning" />
+    <Rule Id="CA1400" Action="Warning" />
+    <Rule Id="CA1401" Action="Warning" />
+    <Rule Id="CA1403" Action="Warning" />
+    <Rule Id="CA1404" Action="Warning" />
+    <Rule Id="CA1405" Action="Warning" />
+    <Rule Id="CA1410" Action="Warning" />
+    <Rule Id="CA1415" Action="Warning" />
+    <Rule Id="CA1821" Action="Warning" />
+    <Rule Id="CA1900" Action="Warning" />
+    <Rule Id="CA1901" Action="Warning" />
+    <Rule Id="CA2002" Action="Warning" />
+    <Rule Id="CA2100" Action="Warning" />
+    <Rule Id="CA2101" Action="Warning" />
+    <Rule Id="CA2108" Action="Warning" />
+    <Rule Id="CA2111" Action="Warning" />
+    <Rule Id="CA2112" Action="Warning" />
+    <Rule Id="CA2114" Action="Warning" />
+    <Rule Id="CA2116" Action="Warning" />
+    <Rule Id="CA2117" Action="Warning" />
+    <Rule Id="CA2122" Action="Warning" />
+    <Rule Id="CA2123" Action="Warning" />
+    <Rule Id="CA2124" Action="Warning" />
+    <Rule Id="CA2126" Action="Warning" />
+    <Rule Id="CA2131" Action="Warning" />
+    <Rule Id="CA2132" Action="Warning" />
+    <Rule Id="CA2133" Action="Warning" />
+    <Rule Id="CA2134" Action="Warning" />
+    <Rule Id="CA2137" Action="Warning" />
+    <Rule Id="CA2138" Action="Warning" />
+    <Rule Id="CA2140" Action="Warning" />
+    <Rule Id="CA2141" Action="Warning" />
+    <Rule Id="CA2146" Action="Warning" />
+    <Rule Id="CA2147" Action="Warning" />
+    <Rule Id="CA2149" Action="Warning" />
+    <Rule Id="CA2200" Action="Warning" />
+    <Rule Id="CA2202" Action="Warning" />
+    <Rule Id="CA2207" Action="Warning" />
+    <Rule Id="CA2212" Action="Warning" />
+    <Rule Id="CA2213" Action="Warning" />
+    <Rule Id="CA2214" Action="Warning" />
+    <Rule Id="CA2216" Action="Warning" />
+    <Rule Id="CA2220" Action="Warning" />
+    <Rule Id="CA2229" Action="Warning" />
+    <Rule Id="CA2231" Action="Warning" />
+    <Rule Id="CA2232" Action="Warning" />
+    <Rule Id="CA2235" Action="Warning" />
+    <Rule Id="CA2236" Action="Warning" />
+    <Rule Id="CA2237" Action="Warning" />
+    <Rule Id="CA2238" Action="Warning" />
+    <Rule Id="CA2240" Action="Warning" />
+    <Rule Id="CA2241" Action="Warning" />
+    <Rule Id="CA2242" Action="Warning" />
+  </Rules>
+</RuleSet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/packages.config
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/packages.config b/src/Lucene.Net.Java/packages.config
new file mode 100644
index 0000000..786c80f
--- /dev/null
+++ b/src/Lucene.Net.Java/packages.config
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Microsoft.Framework.ConfigurationModel" version="1.0.0-alpha4-10193" targetFramework="portable-net451+win81+wpa81" requireReinstallation="True" />
+</packages>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4b4d4d93/src/Lucene.Net.Java/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Java/project.json b/src/Lucene.Net.Java/project.json
new file mode 100644
index 0000000..5a7cce8
--- /dev/null
+++ b/src/Lucene.Net.Java/project.json
@@ -0,0 +1,20 @@
+{
+    "licenses": [ "apache 2.0" ],
+    "version": "5.0.0.0",
+    "configurations" : {
+        "net451" : { 
+            "dependencies": {
+            }
+        },
+        "k10" : { 
+            "dependencies": {
+                "System.Linq": "",
+                "System.Reflection": "",
+                "System.Runtime": "",
+                "System.Reflection.Extensions": "",
+                "System.Text.RegularExpressions": "",
+                "System.Diagnostics.Debug": ""
+            }
+        }
+    }
+}


Mime
View raw message