Apache Lucene open-source search software
LUCENE-10512: Grammar: Remove incidents of "the the" in comments. (#807)
Rich Bowen0a069ed4542a
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsFormat.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsFormat.javaindex 274da2ccd58..596353cfb3a 100644--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsFormat.java+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsFormat.java@@ -76,7 +76,7 @@ import org.apache.lucene.util.hnsw.HnswGraph;* <ul>* <li><b>[int]</b> the number of nodes on this level* <li><b>array[int]</b> for levels greater than 0 list of nodes on this level, stored as- * the the level 0th nodes ordinals.+ * the level 0th nodes ordinals.* </ul>* </ul>*diff --git a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.javaindex 58aca2d18ef..d50ae3a85cb 100644--- a/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java+++ b/lucene/core/src/java/org/apache/lucene/index/DirectoryReader.java@@ -61,7 +61,7 @@ public abstract class DirectoryReader extends BaseCompositeReader<LeafReader> {}/**- * Returns a IndexReader for the the index in the given Directory+ * Returns a IndexReader for the index in the given Directory** @param directory the index directory* @param leafSorter a comparator for sorting leaf readers. Providing leafSorter is useful fordiff --git a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterDeleteQueue.java b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterDeleteQueue.javaindex ed86416a2b1..95f1da9e562 100644--- a/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterDeleteQueue.java+++ b/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterDeleteQueue.java@@ -579,12 +579,12 @@ final class DocumentsWriterDeleteQueue implements Accountable, Closeable {}/**- * Advances the queue to the next queue on flush. This carries over the the generation to the next+ * Advances the queue to the next queue on flush. This carries over the generation to the next* queue and set the {@link #getMaxSeqNo()} based on the given maxNumPendingOps. This method can* only be called once, subsequently the returned queue should be used.** @param maxNumPendingOps the max number of possible concurrent operations that will execute on- * this queue after it was advanced. This corresponds the the number of DWPTs that own the+ * this queue after it was advanced. This corresponds to the number of DWPTs that own the* current queue at the moment when this queue is advanced since each these DWPTs can* increment the seqId after we advanced it.* @return a new queue as a successor of this queue.diff --git a/lucene/core/src/java/org/apache/lucene/index/OrdinalMap.java b/lucene/core/src/java/org/apache/lucene/index/OrdinalMap.javaindex b69f0b08508..3218e228734 100644--- a/lucene/core/src/java/org/apache/lucene/index/OrdinalMap.java+++ b/lucene/core/src/java/org/apache/lucene/index/OrdinalMap.java@@ -189,7 +189,7 @@ public class OrdinalMap implements Accountable {public final IndexReader.CacheKey owner;// number of global ordinalsfinal long valueCount;- // globalOrd -> (globalOrd - segmentOrd) where segmentOrd is the the ordinal in the first segment+ // globalOrd -> (globalOrd - segmentOrd) where segmentOrd is the ordinal in the first segment// that contains this termfinal LongValues globalOrdDeltas;// globalOrd -> first segment containerdiff --git a/lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java b/lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.javaindex 9357cf10e77..08222107d2d 100644--- a/lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java+++ b/lucene/core/src/java/org/apache/lucene/index/SegmentCommitInfo.java@@ -408,8 +408,8 @@ public class SegmentCommitInfo {/*** Returns and Id that uniquely identifies this segment commit or <code>null</code> if there is no- * ID assigned. This ID changes each time the the segment changes due to a delete, doc-value or- * field update.+ * ID assigned. This ID changes each time the segment changes due to a delete, doc-value or field+ * update.*/public byte[] getId() {return id == null ? null : id.clone();diff --git a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.javaindex 655cf8cc610..e2c37c89b35 100644--- a/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java+++ b/lucene/core/src/java/org/apache/lucene/util/bkd/BKDWriter.java@@ -396,8 +396,8 @@ public class BKDWriter implements Closeable {int numLeaves();/*** pointer to the leaf node previously written. Leaves are order from left to right, so leaf at- * {@code index} 0 is the leftmost leaf and the the leaf at {@code numleaves()} -1 is the- * rightmost leaf+ * {@code index} 0 is the leftmost leaf and the leaf at {@code numleaves()} -1 is the rightmost+ * leaf*/long getLeafLP(int index);/**diff --git a/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MultiTermHighlighting.java b/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MultiTermHighlighting.javaindex c638a62c19c..0e642f1431e 100644--- a/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MultiTermHighlighting.java+++ b/lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/MultiTermHighlighting.java@@ -48,7 +48,7 @@ final class MultiTermHighlighting {}/**- * Indicates if the the leaf query (from {@link QueryVisitor#visitLeaf(Query)}) is a type of query+ * Indicates if the leaf query (from {@link QueryVisitor#visitLeaf(Query)}) is a type of query* that we can extract automata from.*/public static boolean canExtractAutomataFromLeafQuery(Query query) {diff --git a/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.java b/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.javaindex a3287fdcb78..0bf84e3ed3d 100644--- a/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.java+++ b/lucene/join/src/java/org/apache/lucene/search/join/JoinUtil.java@@ -66,7 +66,7 @@ public final class JoinUtil {** <p>In the case a single document relates to more than one document the <code>* multipleValuesPerDocument</code> option should be set to true. When the <code>- * multipleValuesPerDocument</code> is set to <code>true</code> only the the score from the first+ * multipleValuesPerDocument</code> is set to <code>true</code> only the score from the first* encountered join value originating from the 'from' side is mapped into the 'to' side. Even in* the case when a second join value related to a specific document yields a higher score.* Obviously this doesn't apply in the case that {@link ScoreMode#None} is used, since no scoresdiff --git a/lucene/join/src/java/org/apache/lucene/search/join/SeekingTermSetTermsEnum.java b/lucene/join/src/java/org/apache/lucene/search/join/SeekingTermSetTermsEnum.javaindex 17df67b8372..2690a32d933 100644--- a/lucene/join/src/java/org/apache/lucene/search/join/SeekingTermSetTermsEnum.java+++ b/lucene/join/src/java/org/apache/lucene/search/join/SeekingTermSetTermsEnum.java@@ -74,7 +74,7 @@ public class SeekingTermSetTermsEnum extends FilteredTermsEnum {} else {if (upto == lastElement) {return AcceptStatus.NO;- } else { // Our current term doesn't match the the given term.+ } else { // Our current term doesn't match the given term.int cmp;do { // We maybe are behind the given term by more than one step. Keep incrementing till// we're the same or higher.diff --git a/lucene/join/src/java/org/apache/lucene/search/join/package-info.java b/lucene/join/src/java/org/apache/lucene/search/join/package-info.javaindex 507324dde34..949ca19a58a 100644--- a/lucene/join/src/java/org/apache/lucene/search/join/package-info.java+++ b/lucene/join/src/java/org/apache/lucene/search/join/package-info.java@@ -40,7 +40,7 @@* <p>If you care about what child documents matched for each parent document, then use the {@link* org.apache.lucene.search.join.ParentChildrenBlockJoinQuery} query to per matched parent document* retrieve the child documents that caused to match the parent document in first place. This query- * should be used after your main query has been executed. For each hit execute the the {@link+ * should be used after your main query has been executed. For each hit execute the {@link* org.apache.lucene.search.join.ParentChildrenBlockJoinQuery} query** <pre class="prettyprint">diff --git a/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java b/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.javaindex 994bf86a4a3..01bce7f1319 100644--- a/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java+++ b/lucene/misc/src/java/org/apache/lucene/misc/store/DirectIODirectory.java@@ -74,8 +74,8 @@ public class DirectIODirectory extends FilterDirectory {* <ol>* <li>ExtendedOpenOption.DIRECT is OpenJDK's internal proprietary API. This API causes* un-suppressible(?) warning to be emitted when compiling with --release flag and value N,- * where N is smaller than the the version of javac used for compilation. For details,- * please refer to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8259039.+ * where N is smaller than the version of javac used for compilation. For details, please+ * refer to https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8259039.* <li>It is possible that Lucene is run using JDK that does not support* ExtendedOpenOption.DIRECT. In such a case, dynamic lookup allows us to bail out with* UnsupportedOperationException with meaningful error message.diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.javaindex fceff79afaa..0155916dded 100644--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoComplexPolygon.java@@ -769,7 +769,7 @@ class GeoComplexPolygon extends GeoBasePolygon {final Plane p, final GeoPoint[] notablePoints, final Membership... bounds) {// Create the intersectorfinal EdgeIterator intersector = new IntersectorEdgeIterator(p, notablePoints, bounds);- // First, compute the bounds for the the plane+ // First, compute the bounds for the planefinal XYZBounds xyzBounds = new XYZBounds();p.recordBounds(planetModel, xyzBounds, bounds);for (final GeoPoint point : notablePoints) {@@ -806,7 +806,7 @@ class GeoComplexPolygon extends GeoBasePolygon {public boolean intersects(GeoShape geoShape) {// Create the intersectorfinal EdgeIterator intersector = new IntersectorShapeIterator(geoShape);- // First, compute the bounds for the the plane+ // First, compute the bounds for the planefinal XYZBounds xyzBounds = new XYZBounds();geoShape.getBounds(xyzBounds);diff --git a/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentDictionary.java b/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentDictionary.javaindex f2d5bb99848..a85d3427015 100644--- a/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentDictionary.java+++ b/lucene/suggest/src/java/org/apache/lucene/search/suggest/DocumentDictionary.java@@ -64,8 +64,8 @@ public class DocumentDictionary implements Dictionary {/*** Creates a new dictionary with the contents of the fields named <code>field</code> for the- * terms, <code>weightField</code> for the weights that will be used for the the corresponding- * terms and <code>payloadField</code> for the corresponding payloads for the entry.+ * terms, <code>weightField</code> for the weights that will be used for the corresponding terms+ * and <code>payloadField</code> for the corresponding payloads for the entry.*/public DocumentDictionary(IndexReader reader, String field, String weightField, String payloadField) {@@ -74,8 +74,8 @@ public class DocumentDictionary implements Dictionary {/*** Creates a new dictionary with the contents of the fields named <code>field</code> for the- * terms, <code>weightField</code> for the weights that will be used for the the corresponding- * terms, <code>payloadField</code> for the corresponding payloads for the entry and <code>+ * terms, <code>weightField</code> for the weights that will be used for the corresponding terms,+ * <code>payloadField</code> for the corresponding payloads for the entry and <code>* contextsField</code> for associated contexts.*/public DocumentDictionary(diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java b/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.javaindex ac793b9e4ba..446cd467d6d 100644--- a/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/util/LuceneTestCase.java@@ -3134,9 +3134,8 @@ public abstract class LuceneTestCase extends Assert {}/**- * Compares two strings with a collator, also looking to see if the the strings are impacted by- * jdk bugs. may not avoid all jdk bugs in tests. see- * https://bugs.openjdk.java.net/browse/JDK-8071862+ * Compares two strings with a collator, also looking to see if the strings are impacted by jdk+ * bugs. may not avoid all jdk bugs in tests. see https://bugs.openjdk.java.net/browse/JDK-8071862*/@SuppressForbidden(reason = "dodges JDK-8071862")public static int collate(Collator collator, String s1, String s2) {