Remove duplicated "the" from comments (#4666)

diff --git a/source/binary.cpp b/source/binary.cpp
index 48a94f1..bbaa2c2 100644
--- a/source/binary.cpp
+++ b/source/binary.cpp
@@ -300,7 +300,7 @@
   const uint32_t first_word = peek();
 
   // If the module's endianness is different from the host native endianness,
-  // then converted_words contains the the endian-translated words in the
+  // then converted_words contains the endian-translated words in the
   // instruction.
   _.endian_converted_words.clear();
   _.endian_converted_words.push_back(first_word);
diff --git a/source/cfa.h b/source/cfa.h
index 0d09014..7cadf55 100644
--- a/source/cfa.h
+++ b/source/cfa.h
@@ -42,7 +42,7 @@
 
   /// Returns true if a block with @p id is found in the @p work_list vector
   ///
-  /// @param[in] work_list  Set of blocks visited in the the depth first
+  /// @param[in] work_list  Set of blocks visited in the depth first
   /// traversal
   ///                       of the CFG
   /// @param[in] id         The ID of the block being checked
diff --git a/source/fuzz/fuzzer_context.cpp b/source/fuzz/fuzzer_context.cpp
index c217542..7e34cc3 100644
--- a/source/fuzz/fuzzer_context.cpp
+++ b/source/fuzz/fuzzer_context.cpp
@@ -21,7 +21,7 @@
 
 namespace {
 
-// An offset between the the module's id bound and the minimum fresh id.
+// An offset between the module's id bound and the minimum fresh id.
 //
 // TODO(https://github.com/KhronosGroup/SPIRV-Tools/issues/2541): consider
 //  the case where the maximum id bound is reached.
diff --git a/source/opt/dead_branch_elim_pass.h b/source/opt/dead_branch_elim_pass.h
index 7841bc4..c350bb2 100644
--- a/source/opt/dead_branch_elim_pass.h
+++ b/source/opt/dead_branch_elim_pass.h
@@ -98,7 +98,7 @@
   // Fix phis in reachable blocks so that only live (or unremovable) incoming
   // edges are present. If the block now only has a single live incoming edge,
   // remove the phi and replace its uses with its data input. If the single
-  // remaining incoming edge is from the phi itself, the the phi is in an
+  // remaining incoming edge is from the phi itself, the phi is in an
   // unreachable single block loop. Either the block is dead and will be
   // removed, or it's reachable from an unreachable continue target. In the
   // latter case that continue target block will be collapsed into a block that
diff --git a/source/opt/desc_sroa.h b/source/opt/desc_sroa.h
index 383d441..6a24fd8 100644
--- a/source/opt/desc_sroa.h
+++ b/source/opt/desc_sroa.h
@@ -132,7 +132,7 @@
 
   // A map from an OpVariable instruction to the set of variables that will be
   // used to replace it. The entry |replacement_variables_[var][i]| is the id of
-  // a variable that will be used in the place of the the ith element of the
+  // a variable that will be used in the place of the ith element of the
   // array |var|. If the entry is |0|, then the variable has not been
   // created yet.
   std::map<Instruction*, std::vector<uint32_t>> replacement_variables_;
diff --git a/source/opt/dominator_tree.h b/source/opt/dominator_tree.h
index 0024bc5..1674b22 100644
--- a/source/opt/dominator_tree.h
+++ b/source/opt/dominator_tree.h
@@ -278,7 +278,7 @@
 
  private:
   // Wrapper function which gets the list of pairs of each BasicBlocks to its
-  // immediately  dominating BasicBlock and stores the result in the the edges
+  // immediately  dominating BasicBlock and stores the result in the edges
   // parameter.
   //
   // The |edges| vector will contain the dominator tree as pairs of nodes.
diff --git a/source/opt/loop_fission.cpp b/source/opt/loop_fission.cpp
index 0678113..0a4125d 100644
--- a/source/opt/loop_fission.cpp
+++ b/source/opt/loop_fission.cpp
@@ -453,7 +453,7 @@
   for (Function& f : *context()->module()) {
     // We collect all the inner most loops in the function and run the loop
     // splitting util on each. The reason we do this is to allow us to iterate
-    // over each, as creating new loops will invalidate the the loop iterator.
+    // over each, as creating new loops will invalidate the loop iterator.
     std::vector<Loop*> inner_most_loops{};
     LoopDescriptor& loop_descriptor = *context()->GetLoopDescriptor(&f);
     for (Loop& loop : loop_descriptor) {
diff --git a/source/opt/register_pressure.cpp b/source/opt/register_pressure.cpp
index 5750c6d..1ad3373 100644
--- a/source/opt/register_pressure.cpp
+++ b/source/opt/register_pressure.cpp
@@ -378,7 +378,7 @@
   // The loop fusion is injecting the l1 before the l2, the latch of l1 will be
   // connected to the header of l2.
   // To compute the register usage, we inject the loop live-in (union of l1 and
-  // l2 live-in header blocks) into the the live in/out of each basic block of
+  // l2 live-in header blocks) into the live in/out of each basic block of
   // l1 to get the peak register usage. We then repeat the operation to for l2
   // basic blocks but in this case we inject the live-out of the latch of l1.
   auto live_loop = MakeFilterIteratorRange(
diff --git a/source/opt/scalar_analysis_simplification.cpp b/source/opt/scalar_analysis_simplification.cpp
index 52f2d6a..9c81dbe 100644
--- a/source/opt/scalar_analysis_simplification.cpp
+++ b/source/opt/scalar_analysis_simplification.cpp
@@ -134,7 +134,7 @@
   // offset.
   SENode* EliminateZeroCoefficientRecurrents(SENode* node);
 
-  // A reference the the analysis which requested the simplification.
+  // A reference the analysis which requested the simplification.
   ScalarEvolutionAnalysis& analysis_;
 
   // The node being simplified.
diff --git a/source/opt/strength_reduction_pass.h b/source/opt/strength_reduction_pass.h
index 8dfeb30..1cbbbcc 100644
--- a/source/opt/strength_reduction_pass.h
+++ b/source/opt/strength_reduction_pass.h
@@ -34,7 +34,7 @@
   // Returns true if something changed.
   bool ReplaceMultiplyByPowerOf2(BasicBlock::iterator*);
 
-  // Scan the types and constants in the module looking for the the integer
+  // Scan the types and constants in the module looking for the integer
   // types that we are
   // interested in.  The shift operation needs a small unsigned integer.  We
   // need to find
diff --git a/source/val/validate.cpp b/source/val/validate.cpp
index 7655c96..64df67c 100644
--- a/source/val/validate.cpp
+++ b/source/val/validate.cpp
@@ -202,7 +202,7 @@
                  /* diagnostic = */ nullptr);
 
   // Parse the module and perform inline validation checks. These checks do
-  // not require the the knowledge of the whole module.
+  // not require the knowledge of the whole module.
   if (auto error = spvBinaryParse(&context, vstate, words, num_words,
                                   /*parsed_header =*/nullptr,
                                   ProcessInstruction, pDiagnostic)) {
diff --git a/source/val/validate_memory.cpp b/source/val/validate_memory.cpp
index a7b0f82..93b1800 100644
--- a/source/val/validate_memory.cpp
+++ b/source/val/validate_memory.cpp
@@ -1411,7 +1411,7 @@
            << state.getIdName(inst->id()) << "' must be an OpTypeRuntimeArray.";
   }
 
-  // The array member must the the index of the last element (the run time
+  // The array member must the index of the last element (the run time
   // array).
   if (inst->GetOperandAs<uint32_t>(3) != num_of_members - 1) {
     return state.diag(SPV_ERROR_INVALID_ID, inst)
diff --git a/utils/vscode/src/lsp/protocol/tsprotocol.go b/utils/vscode/src/lsp/protocol/tsprotocol.go
index 50543fc..29dd986 100644
--- a/utils/vscode/src/lsp/protocol/tsprotocol.go
+++ b/utils/vscode/src/lsp/protocol/tsprotocol.go
@@ -2844,7 +2844,7 @@
 
 	/*TargetSelectionRange defined:
 	 * The range that should be selected and revealed when this link is being followed, e.g the name of a function.
-	 * Must be contained by the the `targetRange`. See also `DocumentSymbol#range`
+	 * Must be contained by the `targetRange`. See also `DocumentSymbol#range`
 	 */
 	TargetSelectionRange Range `json:"targetSelectionRange"`
 }
@@ -3627,14 +3627,14 @@
 
 	/*Range defined:
 	 * The range enclosing this symbol not including leading/trailing whitespace but everything else
-	 * like comments. This information is typically used to determine if the the clients cursor is
+	 * like comments. This information is typically used to determine if the clients cursor is
 	 * inside the symbol to reveal in the symbol in the UI.
 	 */
 	Range Range `json:"range"`
 
 	/*SelectionRange defined:
 	 * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
-	 * Must be contained by the the `range`.
+	 * Must be contained by the `range`.
 	 */
 	SelectionRange Range `json:"selectionRange"`