You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2016/02/05 18:02:31 UTC

[27/87] [abbrv] [partial] lucene-solr git commit: LUCENE-7013: Move license header to top of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicBlockPackedWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicBlockPackedWriter.java b/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicBlockPackedWriter.java
index eb3a016..8652f25 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicBlockPackedWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicBlockPackedWriter.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import static org.apache.lucene.util.BitUtil.zigZagEncode;
 import static org.apache.lucene.util.packed.MonotonicBlockPackedReader.expected;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicLongValues.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicLongValues.java b/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicLongValues.java
index 54e9d8c..6d396a2 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicLongValues.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/MonotonicLongValues.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.util.Arrays;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/Packed16ThreeBlocks.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/Packed16ThreeBlocks.java b/lucene/core/src/java/org/apache/lucene/util/packed/Packed16ThreeBlocks.java
index b8eb4e9..8e8e94d 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/Packed16ThreeBlocks.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/Packed16ThreeBlocks.java
@@ -1,7 +1,5 @@
 // This file has been automatically generated, DO NOT EDIT
 
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,6 +16,7 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
 
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.util.RamUsageEstimator;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/Packed64.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/Packed64.java b/lucene/core/src/java/org/apache/lucene/util/packed/Packed64.java
index 7991647..ae43032 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/Packed64.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/Packed64.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.io.IOException;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java b/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
index 09eb669..a7262b3 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/Packed64SingleBlock.java
@@ -1,7 +1,5 @@
 // This file has been automatically generated, DO NOT EDIT
 
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements. See the NOTICE file distributed with this
@@ -18,6 +16,7 @@ package org.apache.lucene.util.packed;
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+package org.apache.lucene.util.packed;
 
 import java.io.IOException;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/Packed8ThreeBlocks.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/Packed8ThreeBlocks.java b/lucene/core/src/java/org/apache/lucene/util/packed/Packed8ThreeBlocks.java
index d480fa0..5a85735 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/Packed8ThreeBlocks.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/Packed8ThreeBlocks.java
@@ -1,7 +1,5 @@
 // This file has been automatically generated, DO NOT EDIT
 
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,6 +16,7 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
 
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.util.RamUsageEstimator;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataInput.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataInput.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataInput.java
index 87a4c57..954449b 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataInput.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataInput.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataOutput.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataOutput.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataOutput.java
index e750526..44410f8 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataOutput.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedDataOutput.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
index 86a991b..4df8580 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.io.IOException;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedLongValues.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedLongValues.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedLongValues.java
index 2a46fa5..0daf062 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedLongValues.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedLongValues.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import static org.apache.lucene.util.packed.PackedInts.checkBlockSize;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java
index 198382d..798325b 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedReaderIterator.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import java.io.EOFException;
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PackedWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PackedWriter.java b/lucene/core/src/java/org/apache/lucene/util/packed/PackedWriter.java
index 63b3cbe..8853348 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PackedWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PackedWriter.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import org.apache.lucene.store.DataOutput;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PagedGrowableWriter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PagedGrowableWriter.java b/lucene/core/src/java/org/apache/lucene/util/packed/PagedGrowableWriter.java
index 7a3a4cb..ab6c65a 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PagedGrowableWriter.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PagedGrowableWriter.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import org.apache.lucene.util.RamUsageEstimator;
 import org.apache.lucene.util.packed.PackedInts.Mutable;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/PagedMutable.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/PagedMutable.java b/lucene/core/src/java/org/apache/lucene/util/packed/PagedMutable.java
index 69e7619..fe75fe7 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/PagedMutable.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/PagedMutable.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
+
 
 import org.apache.lucene.util.RamUsageEstimator;
 import org.apache.lucene.util.packed.PackedInts.Mutable;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py
index ea904a2..e01776c 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_BulkOperation.py
@@ -24,8 +24,6 @@ PACKED_64_SINGLE_BLOCK_BPV = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 21, 32]
 OUTPUT_FILE = "BulkOperation.java"
 HEADER = """// This file has been automatically generated, DO NOT EDIT
 
-package org.apache.lucene.util.packed;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -42,10 +40,11 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
 
 """
 
-FOOTER="""
+FOOTER = """
   protected int writeLong(long block, byte[] blocks, int blocksOffset) {
     for (int j = 1; j <= 8; ++j) {
       blocks[blocksOffset++] = (byte) (block >>> (64 - (j << 3)));
@@ -90,7 +89,7 @@ def is_power_of_two(n):
   return n & (n - 1) == 0
 
 def casts(typ):
-  cast_start = "(%s) (" %typ
+  cast_start = "(%s) (" % typ
   cast_end = ")"
   if typ == "long":
     cast_start = ""
@@ -107,7 +106,7 @@ def hexNoLSuffix(n):
 def masks(bits):
   if bits == 64:
     return "", ""
-  return "(", " & %sL)" %(hexNoLSuffix((1 << bits) - 1))
+  return "(", " & %sL)" % (hexNoLSuffix((1 << bits) - 1))
 
 def get_type(bits):
   if bits == 8:
@@ -127,15 +126,15 @@ def block_value_count(bpv, bits=64):
   while blocks % 2 == 0 and values % 2 == 0:
     blocks /= 2
     values /= 2
-  assert values * bpv == bits * blocks, "%d values, %d blocks, %d bits per value" %(values, blocks, bpv)
+  assert values * bpv == bits * blocks, "%d values, %d blocks, %d bits per value" % (values, blocks, bpv)
   return (blocks, values)
 
 def packed64(bpv, f):
   mask = (1 << bpv) - 1
 
   f.write("\n")
-  f.write("  public BulkOperationPacked%d() {\n" %bpv)
-  f.write("    super(%d);\n" %bpv)
+  f.write("  public BulkOperationPacked%d() {\n" % bpv)
+  f.write("    super(%d);\n" % bpv)
   f.write("  }\n\n")
 
   if bpv == 64:
@@ -169,7 +168,7 @@ def p64_decode(bpv, f, bits):
   cast_start, cast_end = casts(typ)
 
   f.write("  @Override\n")
-  f.write("  public void decode(long[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
+  f.write("  public void decode(long[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" % typ)
   if bits < bpv:
     f.write("    throw new UnsupportedOperationException();\n")
   else:
@@ -178,37 +177,37 @@ def p64_decode(bpv, f, bits):
 
     if is_power_of_two(bpv):
       f.write("      final long block = blocks[blocksOffset++];\n")
-      f.write("      for (int shift = %d; shift >= 0; shift -= %d) {\n" %(64 - bpv, bpv))
-      f.write("        values[valuesOffset++] = %s(block >>> shift) & %d%s;\n" %(cast_start, mask, cast_end))
-      f.write("      }\n") 
+      f.write("      for (int shift = %d; shift >= 0; shift -= %d) {\n" % (64 - bpv, bpv))
+      f.write("        values[valuesOffset++] = %s(block >>> shift) & %d%s;\n" % (cast_start, mask, cast_end))
+      f.write("      }\n")
     else:
       for i in xrange(0, values):
         block_offset = i * bpv / 64
         bit_offset = (i * bpv) % 64
         if bit_offset == 0:
           # start of block
-          f.write("      final long block%d = blocks[blocksOffset++];\n" %block_offset);
-          f.write("      values[valuesOffset++] = %sblock%d >>> %d%s;\n" %(cast_start, block_offset, 64 - bpv, cast_end))
+          f.write("      final long block%d = blocks[blocksOffset++];\n" % block_offset);
+          f.write("      values[valuesOffset++] = %sblock%d >>> %d%s;\n" % (cast_start, block_offset, 64 - bpv, cast_end))
         elif bit_offset + bpv == 64:
           # end of block
-          f.write("      values[valuesOffset++] = %sblock%d & %dL%s;\n" %(cast_start, block_offset, mask, cast_end))
+          f.write("      values[valuesOffset++] = %sblock%d & %dL%s;\n" % (cast_start, block_offset, mask, cast_end))
         elif bit_offset + bpv < 64:
           # middle of block
-          f.write("      values[valuesOffset++] = %s(block%d >>> %d) & %dL%s;\n" %(cast_start, block_offset, 64 - bit_offset - bpv, mask, cast_end))
+          f.write("      values[valuesOffset++] = %s(block%d >>> %d) & %dL%s;\n" % (cast_start, block_offset, 64 - bit_offset - bpv, mask, cast_end))
         else:
           # value spans across 2 blocks
-          mask1 = (1 << (64 - bit_offset)) -1
+          mask1 = (1 << (64 - bit_offset)) - 1
           shift1 = bit_offset + bpv - 64
           shift2 = 64 - shift1
-          f.write("      final long block%d = blocks[blocksOffset++];\n" %(block_offset + 1));
-          f.write("      values[valuesOffset++] = %s((block%d & %dL) << %d) | (block%d >>> %d)%s;\n" %(cast_start, block_offset, mask1, shift1, block_offset + 1, shift2, cast_end))
+          f.write("      final long block%d = blocks[blocksOffset++];\n" % (block_offset + 1));
+          f.write("      values[valuesOffset++] = %s((block%d & %dL) << %d) | (block%d >>> %d)%s;\n" % (cast_start, block_offset, mask1, shift1, block_offset + 1, shift2, cast_end))
     f.write("    }\n")
   f.write("  }\n\n")
 
   byte_blocks, byte_values = block_value_count(bpv, 8)
 
   f.write("  @Override\n")
-  f.write("  public void decode(byte[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" %typ)
+  f.write("  public void decode(byte[] blocks, int blocksOffset, %s[] values, int valuesOffset, int iterations) {\n" % typ)
   if bits < bpv:
     f.write("    throw new UnsupportedOperationException();\n")
   else:
@@ -216,8 +215,8 @@ def p64_decode(bpv, f, bits):
       f.write("    for (int j = 0; j < iterations; ++j) {\n")
       f.write("      final byte block = blocks[blocksOffset++];\n")
       for shift in xrange(8 - bpv, 0, -bpv):
-        f.write("      values[valuesOffset++] = (block >>> %d) & %d;\n" %(shift, mask))
-      f.write("      values[valuesOffset++] = block & %d;\n" %mask)
+        f.write("      values[valuesOffset++] = (block >>> %d) & %d;\n" % (shift, mask))
+      f.write("      values[valuesOffset++] = block & %d;\n" % mask)
       f.write("    }\n")
     elif bpv == 8:
       f.write("    for (int j = 0; j < iterations; ++j) {\n")
@@ -228,8 +227,8 @@ def p64_decode(bpv, f, bits):
       m = bits <= 32 and "0xFF" or "0xFFL"
       f.write("      values[valuesOffset++] =")
       for i in xrange(bpv / 8 - 1):
-        f.write(" ((blocks[blocksOffset++] & %s) << %d) |" %(m, bpv - 8))
-      f.write(" (blocks[blocksOffset++] & %s);\n" %m)
+        f.write(" ((blocks[blocksOffset++] & %s) << %d) |" % (m, bpv - 8))
+      f.write(" (blocks[blocksOffset++] & %s);\n" % m)
       f.write("    }\n")
     else:
       f.write("    for (int i = 0; i < iterations; ++i) {\n")
@@ -240,32 +239,32 @@ def p64_decode(bpv, f, bits):
         bit_end = ((i + 1) * bpv - 1) % 8
         shift = lambda b: 8 * (byte_end - b - 1) + 1 + bit_end
         if bit_start == 0:
-          f.write("      final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, byte_start))
+          f.write("      final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" % (typ, byte_start))
         for b in xrange(byte_start + 1, byte_end + 1):
-          f.write("      final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" %(typ, b))
+          f.write("      final %s byte%d = blocks[blocksOffset++] & 0xFF;\n" % (typ, b))
         f.write("      values[valuesOffset++] =")
         if byte_start == byte_end:
           if bit_start == 0:
             if bit_end == 7:
-              f.write(" byte%d" %byte_start)
+              f.write(" byte%d" % byte_start)
             else:
-              f.write(" byte%d >>> %d" %(byte_start, 7 - bit_end))
+              f.write(" byte%d >>> %d" % (byte_start, 7 - bit_end))
           else:
             if bit_end == 7:
-              f.write(" byte%d & %d" %(byte_start, 2 ** (8 - bit_start) - 1))
+              f.write(" byte%d & %d" % (byte_start, 2 ** (8 - bit_start) - 1))
             else:
-              f.write(" (byte%d >>> %d) & %d" %(byte_start, 7 - bit_end, 2 ** (bit_end - bit_start + 1) - 1))
+              f.write(" (byte%d >>> %d) & %d" % (byte_start, 7 - bit_end, 2 ** (bit_end - bit_start + 1) - 1))
         else:
           if bit_start == 0:
-            f.write(" (byte%d << %d)" %(byte_start, shift(byte_start)))
+            f.write(" (byte%d << %d)" % (byte_start, shift(byte_start)))
           else:
-            f.write(" ((byte%d & %d) << %d)" %(byte_start, 2 ** (8 - bit_start) - 1, shift(byte_start)))
+            f.write(" ((byte%d & %d) << %d)" % (byte_start, 2 ** (8 - bit_start) - 1, shift(byte_start)))
           for b in xrange(byte_start + 1, byte_end):
-            f.write(" | (byte%d << %d)" %(b, shift(b)))
+            f.write(" | (byte%d << %d)" % (b, shift(b)))
           if bit_end == 7:
-            f.write(" | byte%d" %byte_end)
+            f.write(" | byte%d" % byte_end)
           else:
-            f.write(" | (byte%d >>> %d)" %(byte_end, 7 - bit_end))
+            f.write(" | (byte%d >>> %d)" % (byte_end, 7 - bit_end))
         f.write(";\n")
       f.write("    }\n")
   f.write("  }\n\n")
@@ -280,7 +279,7 @@ if __name__ == '__main__':
 
   f.write('abstract class BulkOperation implements PackedInts.Decoder, PackedInts.Encoder {\n')
   f.write('  private static final BulkOperation[] packedBulkOps = new BulkOperation[] {\n')
-    
+
   for bpv in xrange(1, 65):
     if bpv > MAX_SPECIALIZED_BITS_PER_VALUE:
       f.write('    new BulkOperationPacked(%d),\n' % bpv)
@@ -299,20 +298,20 @@ if __name__ == '__main__':
     f2.write('}\n')
     f2.close()
     f.write('    new BulkOperationPacked%d(),\n' % bpv)
-    
+
   f.write('  };\n')
   f.write('\n')
-    
+
   f.write('  // NOTE: this is sparse (some entries are null):\n')
   f.write('  private static final BulkOperation[] packedSingleBlockBulkOps = new BulkOperation[] {\n')
-  for bpv in xrange(1, max(PACKED_64_SINGLE_BLOCK_BPV)+1):
+  for bpv in xrange(1, max(PACKED_64_SINGLE_BLOCK_BPV) + 1):
     if bpv in PACKED_64_SINGLE_BLOCK_BPV:
       f.write('    new BulkOperationPackedSingleBlock(%d),\n' % bpv)
     else:
       f.write('    null,\n')
   f.write('  };\n')
   f.write('\n')
-      
+
   f.write("\n")
   f.write("  public static BulkOperation of(PackedInts.Format format, int bitsPerValue) {\n")
   f.write("    switch (format) {\n")

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py
index 346538e..f8cd4b4 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Direct.py
@@ -15,9 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-HEADER="""// This file has been automatically generated, DO NOT EDIT
-
-package org.apache.lucene.util.packed;
+HEADER = """// This file has been automatically generated, DO NOT EDIT
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -35,6 +33,7 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
 
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.util.RamUsageEstimator;
@@ -51,31 +50,31 @@ CASTS = {8: "(byte) ", 16: "(short) ", 32: "(int) ", 64: ""}
 if __name__ == '__main__':
   for bpv in TYPES.keys():
     type
-    f = open("Direct%d.java" %bpv, 'w')
+    f = open("Direct%d.java" % bpv, 'w')
     f.write(HEADER)
     f.write("""/**
  * Direct wrapping of %d-bits values to a backing array.
  * @lucene.internal
- */\n""" %bpv)
-    f.write("final class Direct%d extends PackedInts.MutableImpl {\n" %bpv)
-    f.write("  final %s[] values;\n\n" %TYPES[bpv])
+ */\n""" % bpv)
+    f.write("final class Direct%d extends PackedInts.MutableImpl {\n" % bpv)
+    f.write("  final %s[] values;\n\n" % TYPES[bpv])
 
-    f.write("  Direct%d(int valueCount) {\n" %bpv)
-    f.write("    super(valueCount, %d);\n" %bpv)
-    f.write("    values = new %s[valueCount];\n" %TYPES[bpv])
+    f.write("  Direct%d(int valueCount) {\n" % bpv)
+    f.write("    super(valueCount, %d);\n" % bpv)
+    f.write("    values = new %s[valueCount];\n" % TYPES[bpv])
     f.write("  }\n\n")
 
-    f.write("  Direct%d(int packedIntsVersion, DataInput in, int valueCount) throws IOException {\n" %bpv)
+    f.write("  Direct%d(int packedIntsVersion, DataInput in, int valueCount) throws IOException {\n" % bpv)
     f.write("    this(valueCount);\n")
     if bpv == 8:
       f.write("    in.readBytes(values, 0, valueCount);\n")
     else:
       f.write("    for (int i = 0; i < valueCount; ++i) {\n")
-      f.write("      values[i] = in.read%s();\n" %TYPES[bpv].title())
+      f.write("      values[i] = in.read%s();\n" % TYPES[bpv].title())
       f.write("    }\n")
     if bpv != 64:
       f.write("    // because packed ints have not always been byte-aligned\n")
-      f.write("    final int remaining = (int) (PackedInts.Format.PACKED.byteCount(packedIntsVersion, valueCount, %d) - %dL * valueCount);\n" %(bpv, bpv / 8))
+      f.write("    final int remaining = (int) (PackedInts.Format.PACKED.byteCount(packedIntsVersion, valueCount, %d) - %dL * valueCount);\n" % (bpv, bpv / 8))
       f.write("    for (int i = 0; i < remaining; ++i) {\n")
       f.write("      in.readByte();\n")
       f.write("    }\n")
@@ -105,7 +104,7 @@ if __name__ == '__main__':
   public void clear() {
     Arrays.fill(values, %s0L);
   }
-""" %(MASKS[bpv], CASTS[bpv], CASTS[bpv]))
+""" % (MASKS[bpv], CASTS[bpv], CASTS[bpv]))
 
     if bpv == 64:
       f.write("""
@@ -169,7 +168,7 @@ if __name__ == '__main__':
     assert val == (val%s);
     Arrays.fill(values, fromIndex, toIndex, %sval);
   }
-""" %(MASKS[bpv], CASTS[bpv], MASKS[bpv], CASTS[bpv]))
+""" % (MASKS[bpv], CASTS[bpv], MASKS[bpv], CASTS[bpv]))
 
     f.write("}\n")
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
index fb70caf..e60bb72 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_Packed64SingleBlock.py
@@ -17,9 +17,7 @@
 
 SUPPORTED_BITS_PER_VALUE = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 21, 32]
 
-HEADER="""// This file has been automatically generated, DO NOT EDIT
-
-package org.apache.lucene.util.packed;
+HEADER = """// This file has been automatically generated, DO NOT EDIT
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -37,6 +35,7 @@ package org.apache.lucene.util.packed;
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+package org.apache.lucene.util.packed;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -234,7 +233,7 @@ abstract class Packed64SingleBlock extends PackedInts.MutableImpl {
     return reader;
   }
 
-""" %(SUPPORTED_BITS_PER_VALUE[-1], ", ".join(map(str, SUPPORTED_BITS_PER_VALUE)))
+""" % (SUPPORTED_BITS_PER_VALUE[-1], ", ".join(map(str, SUPPORTED_BITS_PER_VALUE)))
 
 FOOTER = "}"
 
@@ -245,10 +244,10 @@ if __name__ == '__main__':
   f.write("  public static Packed64SingleBlock create(int valueCount, int bitsPerValue) {\n")
   f.write("    switch (bitsPerValue) {\n")
   for bpv in SUPPORTED_BITS_PER_VALUE:
-    f.write("      case %d:\n" %bpv)
-    f.write("        return new Packed64SingleBlock%d(valueCount);\n" %bpv)
+    f.write("      case %d:\n" % bpv)
+    f.write("        return new Packed64SingleBlock%d(valueCount);\n" % bpv)
   f.write("      default:\n")
-  f.write("        throw new IllegalArgumentException(\"Unsupported number of bits per value: \" + %d);\n" %bpv)
+  f.write("        throw new IllegalArgumentException(\"Unsupported number of bits per value: \" + %d);\n" % bpv)
   f.write("    }\n")
   f.write("  }\n\n")
 
@@ -259,35 +258,35 @@ if __name__ == '__main__':
     if (1 << log_2) != bpv:
       log_2 = None
 
-    f.write("  static class Packed64SingleBlock%d extends Packed64SingleBlock {\n\n" %bpv)
+    f.write("  static class Packed64SingleBlock%d extends Packed64SingleBlock {\n\n" % bpv)
 
-    f.write("    Packed64SingleBlock%d(int valueCount) {\n" %bpv)
-    f.write("      super(valueCount, %d);\n" %bpv)
+    f.write("    Packed64SingleBlock%d(int valueCount) {\n" % bpv)
+    f.write("      super(valueCount, %d);\n" % bpv)
     f.write("    }\n\n")
 
     f.write("    @Override\n")
     f.write("    public long get(int index) {\n")
     if log_2 is not None:
-      f.write("      final int o = index >>> %d;\n" %(6 - log_2))
-      f.write("      final int b = index & %d;\n" %((1 << (6 - log_2)) - 1))
-      f.write("      final int shift = b << %d;\n" %log_2)
+      f.write("      final int o = index >>> %d;\n" % (6 - log_2))
+      f.write("      final int b = index & %d;\n" % ((1 << (6 - log_2)) - 1))
+      f.write("      final int shift = b << %d;\n" % log_2)
     else:
-      f.write("      final int o = index / %d;\n" %(64 / bpv))
-      f.write("      final int b = index %% %d;\n" %(64 / bpv))
-      f.write("      final int shift = b * %d;\n" %bpv)
-    f.write("      return (blocks[o] >>> shift) & %dL;\n" %((1 << bpv) - 1))
+      f.write("      final int o = index / %d;\n" % (64 / bpv))
+      f.write("      final int b = index %% %d;\n" % (64 / bpv))
+      f.write("      final int shift = b * %d;\n" % bpv)
+    f.write("      return (blocks[o] >>> shift) & %dL;\n" % ((1 << bpv) - 1))
     f.write("    }\n\n")
 
     f.write("    @Override\n")
     f.write("    public void set(int index, long value) {\n")
     if log_2 is not None:
-      f.write("      final int o = index >>> %d;\n" %(6 - log_2))
-      f.write("      final int b = index & %d;\n" %((1 << (6 - log_2)) - 1))
-      f.write("      final int shift = b << %d;\n" %log_2)
+      f.write("      final int o = index >>> %d;\n" % (6 - log_2))
+      f.write("      final int b = index & %d;\n" % ((1 << (6 - log_2)) - 1))
+      f.write("      final int shift = b << %d;\n" % log_2)
     else:
-      f.write("      final int o = index / %d;\n" %(64 / bpv))
-      f.write("      final int b = index %% %d;\n" %(64 / bpv))
-      f.write("      final int shift = b * %d;\n" %bpv)
+      f.write("      final int o = index / %d;\n" % (64 / bpv))
+      f.write("      final int b = index %% %d;\n" % (64 / bpv))
+      f.write("      final int shift = b * %d;\n" % bpv)
     f.write("      blocks[o] = (blocks[o] & ~(%dL << shift)) | (value << shift);\n" % ((1 << bpv) - 1))
     f.write("    }\n\n")
     f.write("  }\n\n")

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/gen_PackedThreeBlocks.py
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/gen_PackedThreeBlocks.py b/lucene/core/src/java/org/apache/lucene/util/packed/gen_PackedThreeBlocks.py
index e057f4e..c3a1770 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/gen_PackedThreeBlocks.py
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/gen_PackedThreeBlocks.py
@@ -15,9 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-HEADER="""// This file has been automatically generated, DO NOT EDIT
-
-package org.apache.lucene.util.packed;
+HEADER = """// This file has been automatically generated, DO NOT EDIT
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -35,6 +33,7 @@ package org.apache.lucene.util.packed;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.util.packed;
 
 import org.apache.lucene.store.DataInput;
 import org.apache.lucene.util.RamUsageEstimator;
@@ -51,32 +50,32 @@ CASTS = {8: "(byte) ", 16: "(short) ", 32: "(int) ", 64: ""}
 if __name__ == '__main__':
   for bpv in TYPES.keys():
     type
-    f = open("Packed%dThreeBlocks.java" %bpv, 'w')
+    f = open("Packed%dThreeBlocks.java" % bpv, 'w')
     f.write(HEADER)
     f.write("""/**
  * Packs integers into 3 %ss (%d bits per value).
  * @lucene.internal
- */\n""" %(TYPES[bpv], bpv*3))
-    f.write("final class Packed%dThreeBlocks extends PackedInts.MutableImpl {\n" %bpv)
-    f.write("  final %s[] blocks;\n\n" %TYPES[bpv])
+ */\n""" % (TYPES[bpv], bpv * 3))
+    f.write("final class Packed%dThreeBlocks extends PackedInts.MutableImpl {\n" % bpv)
+    f.write("  final %s[] blocks;\n\n" % TYPES[bpv])
 
     f.write("  public static final int MAX_SIZE = Integer.MAX_VALUE / 3;\n\n")
 
-    f.write("  Packed%dThreeBlocks(int valueCount) {\n" %bpv)
-    f.write("    super(valueCount, %d);\n" %(bpv*3))
+    f.write("  Packed%dThreeBlocks(int valueCount) {\n" % bpv)
+    f.write("    super(valueCount, %d);\n" % (bpv * 3))
     f.write("    if (valueCount > MAX_SIZE) {\n")
     f.write("      throw new ArrayIndexOutOfBoundsException(\"MAX_SIZE exceeded\");\n")
     f.write("    }\n")
-    f.write("    blocks = new %s[valueCount * 3];\n" %TYPES[bpv])
+    f.write("    blocks = new %s[valueCount * 3];\n" % TYPES[bpv])
     f.write("  }\n\n")
 
-    f.write("  Packed%dThreeBlocks(int packedIntsVersion, DataInput in, int valueCount) throws IOException {\n" %bpv)
+    f.write("  Packed%dThreeBlocks(int packedIntsVersion, DataInput in, int valueCount) throws IOException {\n" % bpv)
     f.write("    this(valueCount);\n")
     if bpv == 8:
       f.write("    in.readBytes(blocks, 0, 3 * valueCount);\n")
     else:
       f.write("    for (int i = 0; i < 3 * valueCount; ++i) {\n")
-      f.write("      blocks[i] = in.read%s();\n" %TYPES[bpv].title())
+      f.write("      blocks[i] = in.read%s();\n" % TYPES[bpv].title())
       f.write("    }\n")
     f.write("  }\n")
 
@@ -156,8 +155,8 @@ if __name__ == '__main__':
         + ",size=" + size() + ",blocks=" + blocks.length + ")";
   }
 }
-""" %(MASKS[bpv], 2*bpv, MASKS[bpv], bpv, MASKS[bpv], MASKS[bpv], 2*bpv, MASKS[bpv], bpv, MASKS[bpv], CASTS[bpv], 2*bpv, CASTS[bpv], bpv, CASTS[bpv], CASTS[bpv],
-      2*bpv, CASTS[bpv], bpv, CASTS[bpv], TYPES[bpv], CASTS[bpv], 2*bpv, TYPES[bpv],
+""" % (MASKS[bpv], 2 * bpv, MASKS[bpv], bpv, MASKS[bpv], MASKS[bpv], 2 * bpv, MASKS[bpv], bpv, MASKS[bpv], CASTS[bpv], 2 * bpv, CASTS[bpv], bpv, CASTS[bpv], CASTS[bpv],
+      2 * bpv, CASTS[bpv], bpv, CASTS[bpv], TYPES[bpv], CASTS[bpv], 2 * bpv, TYPES[bpv],
       CASTS[bpv], bpv, TYPES[bpv], CASTS[bpv], CASTS[bpv]))
 
     f.close()

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/java/org/apache/lucene/util/packed/package-info.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/util/packed/package-info.java b/lucene/core/src/java/org/apache/lucene/util/packed/package-info.java
index 0365f77..cb6554c 100644
--- a/lucene/core/src/java/org/apache/lucene/util/packed/package-info.java
+++ b/lucene/core/src/java/org/apache/lucene/util/packed/package-info.java
@@ -14,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 /** 
  * Packed integer arrays and streams.
  * 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestAssertions.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestAssertions.java b/lucene/core/src/test/org/apache/lucene/TestAssertions.java
index 551acc4..808c44c 100644
--- a/lucene/core/src/test/org/apache/lucene/TestAssertions.java
+++ b/lucene/core/src/test/org/apache/lucene/TestAssertions.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import org.apache.lucene.analysis.TokenStream;
 import org.apache.lucene.util.LuceneTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestDemo.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestDemo.java b/lucene/core/src/test/org/apache/lucene/TestDemo.java
index 2647c3b..b4778d9 100644
--- a/lucene/core/src/test/org/apache/lucene/TestDemo.java
+++ b/lucene/core/src/test/org/apache/lucene/TestDemo.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestExternalCodecs.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestExternalCodecs.java b/lucene/core/src/test/org/apache/lucene/TestExternalCodecs.java
index 23c701f..2795679 100644
--- a/lucene/core/src/test/org/apache/lucene/TestExternalCodecs.java
+++ b/lucene/core/src/test/org/apache/lucene/TestExternalCodecs.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.codecs.PostingsFormat;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java b/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
index 3968a19..241e966 100644
--- a/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
+++ b/lucene/core/src/test/org/apache/lucene/TestMergeSchedulerExternal.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestSearch.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestSearch.java b/lucene/core/src/test/org/apache/lucene/TestSearch.java
index 345d702..a5fae05 100644
--- a/lucene/core/src/test/org/apache/lucene/TestSearch.java
+++ b/lucene/core/src/test/org/apache/lucene/TestSearch.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import java.io.PrintWriter;
 import java.io.StringWriter;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java b/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
index ac45b88..c55c7aa 100644
--- a/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
+++ b/lucene/core/src/test/org/apache/lucene/TestSearchForDuplicates.java
@@ -1,5 +1,3 @@
-package org.apache.lucene;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene;
+
 
 import java.io.IOException;
 import java.io.PrintWriter;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java b/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
index 66ee0ce..db3f8e0 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestCachingTokenFilter.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis;
+
 
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/TestCharFilter.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestCharFilter.java b/lucene/core/src/test/org/apache/lucene/analysis/TestCharFilter.java
index 9817337..0aa19a7 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestCharFilter.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestCharFilter.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis;
+
 
 import java.io.IOException;
 import java.io.Reader;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java b/lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java
index 0d5d8a1..eb77bf4 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestNumericTokenStream.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis;
+
 
 import org.apache.lucene.util.LegacyNumericUtils;
 import org.apache.lucene.analysis.LegacyNumericTokenStream.LegacyNumericTermAttributeImpl;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/TestReusableStringReader.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestReusableStringReader.java b/lucene/core/src/test/org/apache/lucene/analysis/TestReusableStringReader.java
index 45f8c42..7f54e56 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestReusableStringReader.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestReusableStringReader.java
@@ -1,9 +1,3 @@
-package org.apache.lucene.analysis;
-
-import java.nio.CharBuffer;
-
-import org.apache.lucene.util.LuceneTestCase;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -20,6 +14,12 @@ import org.apache.lucene.util.LuceneTestCase;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis;
+
+import java.nio.CharBuffer;
+
+import org.apache.lucene.util.LuceneTestCase;
+
 public class TestReusableStringReader extends LuceneTestCase {
   
   public void test() throws Exception {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/TestToken.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/TestToken.java b/lucene/core/src/test/org/apache/lucene/analysis/TestToken.java
index e52587d..fcf7779 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/TestToken.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/TestToken.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis;
+
 
 import org.apache.lucene.analysis.tokenattributes.*;
 import org.apache.lucene.util.AttributeReflector;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestBytesRefAttImpl.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestBytesRefAttImpl.java b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestBytesRefAttImpl.java
index 9bf21de..49e1c22 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestBytesRefAttImpl.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestBytesRefAttImpl.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis.tokenattributes;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis.tokenattributes;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis.tokenattributes;
+
 
 import org.apache.lucene.util.AttributeImpl;
 import org.apache.lucene.util.BytesRef;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
index 2aae192..e02dd02 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestCharTermAttributeImpl.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis.tokenattributes;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis.tokenattributes;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis.tokenattributes;
+
 
 import org.apache.lucene.util.AttributeImpl;
 import org.apache.lucene.util.LuceneTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestPackedTokenAttributeImpl.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestPackedTokenAttributeImpl.java b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestPackedTokenAttributeImpl.java
index 0717fe6..cf4409e 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestPackedTokenAttributeImpl.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestPackedTokenAttributeImpl.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis.tokenattributes;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis.tokenattributes;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis.tokenattributes;
+
 
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.analysis.TokenStream;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestSimpleAttributeImpl.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestSimpleAttributeImpl.java b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestSimpleAttributeImpl.java
index 7d547ea..0f752da 100644
--- a/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestSimpleAttributeImpl.java
+++ b/lucene/core/src/test/org/apache/lucene/analysis/tokenattributes/TestSimpleAttributeImpl.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.analysis.tokenattributes;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.analysis.tokenattributes;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.analysis.tokenattributes;
+
 
 import org.apache.lucene.util.TestUtil;
 import org.apache.lucene.util.LuceneTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java b/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
index 03251db..65f3016 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/TestCodecLoadingDeadlock.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs;
+
 
 import java.nio.file.Paths;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestCompressionMode.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestCompressionMode.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestCompressionMode.java
index 305bf38..c8d244b 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestCompressionMode.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestCompressionMode.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 import java.io.IOException;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestLZ4CompressionMode.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestLZ4CompressionMode.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestLZ4CompressionMode.java
index 1cfdb44..5a2801e 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestLZ4CompressionMode.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/AbstractTestLZ4CompressionMode.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastCompressionMode.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastCompressionMode.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastCompressionMode.java
index 4fd3471..e33996a 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastCompressionMode.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastCompressionMode.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 public class TestFastCompressionMode extends AbstractTestLZ4CompressionMode {
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastDecompressionMode.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastDecompressionMode.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastDecompressionMode.java
index de14013..1ecfc8b 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastDecompressionMode.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestFastDecompressionMode.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestGrowableByteArrayDataOutput.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestGrowableByteArrayDataOutput.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestGrowableByteArrayDataOutput.java
index a0a52c9..fb90d92 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestGrowableByteArrayDataOutput.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestGrowableByteArrayDataOutput.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java
index 065be63..61cf0c0 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/compressing/TestHighCompressionMode.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.compressing;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.compressing;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.compressing;
+
 
 
 public class TestHighCompressionMode extends AbstractTestCompressionMode {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat.java
index 1663400..6acd053 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.codecs.Codec;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat2.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat2.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat2.java
index 47a3344..b59c587 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat2.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat2.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat3.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat3.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat3.java
index 82fa465..1b3b9af 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat3.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestBlockPostingsFormat3.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import java.util.ArrayList;
 import java.util.Collections;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestForUtil.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestForUtil.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestForUtil.java
index 716b8b8..5d1e726 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestForUtil.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestForUtil.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import static org.apache.lucene.codecs.lucene50.Lucene50PostingsFormat.BLOCK_SIZE;
 import static org.apache.lucene.codecs.lucene50.ForUtil.MAX_DATA_SIZE;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50CompoundFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50CompoundFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50CompoundFormat.java
index 27d091a..bfda748 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50CompoundFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50CompoundFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.index.BaseCompoundFormatTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50FieldInfoFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50FieldInfoFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50FieldInfoFormat.java
index 183486f..222ba5e 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50FieldInfoFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50FieldInfoFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.index.BaseFieldInfoFormatTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50SegmentInfoFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50SegmentInfoFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50SegmentInfoFormat.java
index cfe98ac..8114330 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50SegmentInfoFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50SegmentInfoFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.index.BaseSegmentInfoFormatTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormat.java
index f8681b2..4c7bed4 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.index.BaseStoredFieldsFormatTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormatHighCompression.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormatHighCompression.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormatHighCompression.java
index 2d58170..1fe84aa 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormatHighCompression.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50StoredFieldsFormatHighCompression.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat.Mode;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50TermVectorsFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50TermVectorsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50TermVectorsFormat.java
index 0fe4941..e82463d 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50TermVectorsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene50/TestLucene50TermVectorsFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene50;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene50;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene50;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.index.BaseTermVectorsFormatTestCase;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene53/TestLucene53NormsFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene53/TestLucene53NormsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene53/TestLucene53NormsFormat.java
index 361dd0f..c915de0 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene53/TestLucene53NormsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene53/TestLucene53NormsFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene53;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene53;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene53;
+
 
 import org.apache.lucene.codecs.Codec;
 import org.apache.lucene.codecs.lucene60.Lucene60Codec;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene54/TestLucene54DocValuesFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene54/TestLucene54DocValuesFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene54/TestLucene54DocValuesFormat.java
index 352ee80..cede1d7 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene54/TestLucene54DocValuesFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene54/TestLucene54DocValuesFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene54;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene54;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene54;
+
 
 import java.io.IOException;
 import java.util.ArrayList;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointFormat.java
index 322640b..272fc6b 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/lucene60/TestLucene60PointFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.lucene60;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.lucene60;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.lucene60;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
index 1a9161f..2eb0d1a 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldDocValuesFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.perfield;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.perfield;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.perfield;
+
 
 import java.io.IOException;
 import java.util.Collections;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java
index cd2ec13..a1433e3 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.perfield;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.perfield;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.perfield;
+
 
 import java.util.Collections;
 import java.util.Random;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat2.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat2.java b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat2.java
index 5be8c78..67d61df 100644
--- a/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat2.java
+++ b/lucene/core/src/test/org/apache/lucene/codecs/perfield/TestPerFieldPostingsFormat2.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.codecs.perfield;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.codecs.perfield;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.codecs.perfield;
+
 
 import java.io.IOException;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/document/TestBinaryDocument.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestBinaryDocument.java b/lucene/core/src/test/org/apache/lucene/document/TestBinaryDocument.java
index 969a9c8..7d04f3b 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestBinaryDocument.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestBinaryDocument.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.document;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.document;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.document;
+
 
 import java.nio.charset.StandardCharsets;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/document/TestDateTools.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestDateTools.java b/lucene/core/src/test/org/apache/lucene/document/TestDateTools.java
index 183e3e2..ed99ff0 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestDateTools.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestDateTools.java
@@ -1,11 +1,3 @@
-package org.apache.lucene.document;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import org.apache.lucene.util.LuceneTestCase;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -22,6 +14,14 @@ import org.apache.lucene.util.LuceneTestCase;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.document;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import org.apache.lucene.util.LuceneTestCase;
+
 public class TestDateTools extends LuceneTestCase {
   public void testStringToDate() throws ParseException {
     

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestDocument.java b/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
index af37059..41e1f62 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.document;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.document;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.document;
+
 
 import java.io.StringReader;
 import java.nio.charset.StandardCharsets;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/document/TestField.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestField.java b/lucene/core/src/test/org/apache/lucene/document/TestField.java
index 6077c07..85336bc 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestField.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestField.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.document;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.document;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.document;
+
 
 import java.io.StringReader;
 import java.nio.charset.StandardCharsets;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java b/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java
index 00b0966..dcde590 100644
--- a/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java
+++ b/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.document;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.document;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.document;
+
 
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java b/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
index 1d12890..9f273df 100644
--- a/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
+++ b/lucene/core/src/test/org/apache/lucene/index/Test2BBinaryDocValues.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.index;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.index;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.index;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.BinaryDocValuesField;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/813ca772/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java b/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
index b36e27a..2460073 100644
--- a/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
+++ b/lucene/core/src/test/org/apache/lucene/index/Test2BNumericDocValues.java
@@ -1,5 +1,3 @@
-package org.apache.lucene.index;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,6 +14,8 @@ package org.apache.lucene.index;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+package org.apache.lucene.index;
+
 
 import org.apache.lucene.analysis.MockAnalyzer;
 import org.apache.lucene.document.Document;