diff --git a/libs/common/src/main/java/org/opensearch/common/LocalTimeOffset.java b/libs/common/src/main/java/org/opensearch/common/LocalTimeOffset.java
index eb7b331c9aa24..bd063d1858c17 100644
--- a/libs/common/src/main/java/org/opensearch/common/LocalTimeOffset.java
+++ b/libs/common/src/main/java/org/opensearch/common/LocalTimeOffset.java
@@ -48,7 +48,7 @@
* Converts utc into local time and back again.
*
* "Local time" is defined by some time zone, specifically and {@link ZoneId}.
- * At any point in time a particular time zone is at some offset from from
+ * At any point in time a particular time zone is at some offset from
* utc. So converting from utc is as simple as adding the offset.
*
* Getting from local time back to utc is harder. Most local times happen once.
diff --git a/libs/common/src/main/java/org/opensearch/common/lifecycle/package-info.java b/libs/common/src/main/java/org/opensearch/common/lifecycle/package-info.java
index 1bedde5585e36..047f649af2448 100644
--- a/libs/common/src/main/java/org/opensearch/common/lifecycle/package-info.java
+++ b/libs/common/src/main/java/org/opensearch/common/lifecycle/package-info.java
@@ -7,7 +7,7 @@
*/
/**
- * Foundation implementation for a object lifecycle.
+ * Foundation implementation for an object lifecycle.
*
* See {@link org.opensearch.common.lifecycle.Lifecycle} for example usage
*
diff --git a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java
index ae1847776ee1c..a21cf4fd3774b 100644
--- a/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java
+++ b/plugins/repository-azure/src/main/java/org/opensearch/repositories/azure/AzureStorageService.java
@@ -149,7 +149,7 @@ public AzureStorageService(Settings settings) {
/**
* Obtains a {@code BlobServiceClient} on each invocation using the current client
- * settings. BlobServiceClient is thread safe and and could be cached but the settings
+ * settings. BlobServiceClient is thread safe and could be cached but the settings
* can change, therefore the instance might be recreated from scratch.
*
* @param clientName client name
@@ -162,7 +162,7 @@ public Tuple> client(String clientName) {
/**
* Obtains a {@code BlobServiceClient} on each invocation using the current client
- * settings. BlobServiceClient is thread safe and and could be cached but the settings
+ * settings. BlobServiceClient is thread safe and could be cached but the settings
* can change, therefore the instance might be recreated from scratch.
* @param clientName client name
diff --git a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java
index 45c508f4e3dc1..5aecef585c305 100644
--- a/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java
+++ b/server/src/main/java/org/opensearch/action/admin/indices/open/OpenIndexRequestBuilder.java
@@ -39,7 +39,7 @@
import org.opensearch.transport.client.OpenSearchClient;
/**
- * Builder for for open index request
+ * Builder for open index request
*
* @opensearch.api
*/
diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java
index e3b6df8f83789..e08d047d9c570 100644
--- a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java
+++ b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java
@@ -1291,7 +1291,7 @@ synchronized void markItemAsFailed(int slot, Exception e) {
e
);
- // We hit a error during preprocessing a request, so we:
+ // We hit an error during preprocessing a request, so we:
// 1) Remember the request item slot from the bulk, so that we're done processing all requests we know what failed
// 2) Add a bulk item failure for this request
// 3) Continue with the next request in the bulk.
diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
index 02a1727888c43..b00bc59035d59 100644
--- a/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
+++ b/server/src/main/java/org/opensearch/action/bulk/TransportShardBulkAction.java
@@ -946,7 +946,7 @@ private static Engine.Result performOpOnReplica(
// Even though the primary waits on all nodes to ack the mapping changes to the cluster-manager
// (see MappingUpdatedAction.updateMappingOnClusterManager) we still need to protect against missing mappings
// and wait for them. The reason is concurrent requests. Request r1 which has new field f triggers a
- // mapping update. Assume that that update is first applied on the primary, and only later on the replica
+ // mapping update. Assume that the update is first applied on the primary, and only later on the replica
// (it’s happening concurrently). Request r2, which now arrives on the primary and which also has the new
// field f might see the updated mapping (on the primary), and will therefore proceed to be replicated
// to the replica. When it arrives on the replica, there’s no guarantee that the replica has already
diff --git a/server/src/main/java/org/opensearch/cluster/ClusterState.java b/server/src/main/java/org/opensearch/cluster/ClusterState.java
index 1e4fd2dfffe0f..884c9d9fcb8ca 100644
--- a/server/src/main/java/org/opensearch/cluster/ClusterState.java
+++ b/server/src/main/java/org/opensearch/cluster/ClusterState.java
@@ -244,7 +244,7 @@ public long getVersionOrMetadataVersion() {
}
/**
- * This stateUUID is automatically generated for for each version of cluster state. It is used to make sure that
+ * This stateUUID is automatically generated for each version of cluster state. It is used to make sure that
* we are applying diffs to the right previous state.
*/
public String stateUUID() {
diff --git a/server/src/main/java/org/opensearch/index/IndexSettings.java b/server/src/main/java/org/opensearch/index/IndexSettings.java
index 4f761d7d755a9..4b9ca27890e97 100644
--- a/server/src/main/java/org/opensearch/index/IndexSettings.java
+++ b/server/src/main/java/org/opensearch/index/IndexSettings.java
@@ -1843,7 +1843,7 @@ public TimeValue getTranslogRetentionAge() {
}
/**
- * Returns the maximum number of translog files that that no longer required for persistence should be kept for peer recovery
+ * Returns the maximum number of translog files that no longer required for persistence should be kept for peer recovery
* when soft-deletes is disabled.
*/
public int getTranslogRetentionTotalFiles() {
diff --git a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java
index b5752abfa0c02..cc34b8ba7d3ac 100644
--- a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java
+++ b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java
@@ -890,7 +890,7 @@ public IndexResult index(Index index) throws IOException {
* - doc A has autoGeneratedIdTimestamp = 10, isRetry = false
* - doc B has autoGeneratedIdTimestamp = 9, isRetry = false
*
- * while both docs are in in flight, we disconnect on one node, reconnect and send doc A again
+ * while both docs are in flight, we disconnect on one node, reconnect and send doc A again
* - now doc A' has autoGeneratedIdTimestamp = 10, isRetry = true
*
* if A' arrives on the shard first we update maxUnsafeAutoIdTimestamp to 10 and use update document. All subsequent
diff --git a/server/src/main/java/org/opensearch/index/get/ShardGetService.java b/server/src/main/java/org/opensearch/index/get/ShardGetService.java
index 6f8bbc92eb026..c47b4bac1f066 100644
--- a/server/src/main/java/org/opensearch/index/get/ShardGetService.java
+++ b/server/src/main/java/org/opensearch/index/get/ShardGetService.java
@@ -310,7 +310,7 @@ private GetResult innerGetLoadFromStoredFields(
Mapper fieldMapper = docMapper.mappers().getMapper(field);
if (fieldMapper == null) {
if (docMapper.objectMappers().get(field) != null) {
- // Only fail if we know it is a object field, missing paths / fields shouldn't fail.
+ // Only fail if we know it is an object field, missing paths / fields shouldn't fail.
throw new IllegalArgumentException("field [" + field + "] isn't a leaf field");
}
}
diff --git a/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java b/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java
index d7c0da4773fff..86ce6e0572bea 100644
--- a/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java
+++ b/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java
@@ -174,7 +174,7 @@ public boolean isWorker() {
/**
* Sets this task to be a worker task that performs search requests
* @param requestsPerSecond How many search requests per second this task should make
- * @param sliceId If this is is a sliced task, which slice number this task corresponds to. Null if not sliced.
+ * @param sliceId If this is a sliced task, which slice number this task corresponds to. Null if not sliced.
*/
public void setWorker(float requestsPerSecond, @Nullable Integer sliceId) {
if (isWorker()) {
diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java
index 46ac14f2cfbdf..c0ee282d2eb7f 100644
--- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java
+++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java
@@ -6264,7 +6264,7 @@ RetentionLeaseSyncer getRetentionLeaseSyncer() {
/**
* Fetch the latest SegmentInfos held by the shard's underlying Engine, wrapped
- * by a a {@link GatedCloseable} to ensure files are not deleted/merged away.
+ * by a {@link GatedCloseable} to ensure files are not deleted/merged away.
*
* @throws EngineException - When segment infos cannot be safely retrieved
*/
diff --git a/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java b/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java
index 76d39ea86fb94..14a411d948821 100644
--- a/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java
+++ b/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java
@@ -126,7 +126,7 @@ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOExcepti
}
if (indexMetadata.isRoutingPartitionedIndex()) {
// this is the heaviest invariant. Here we have to visit all docs stored fields do extract _id and _routing
- // this this index is routing partitioned.
+ // this index is routing partitioned.
Visitor visitor = new Visitor(leafReader);
TwoPhaseIterator twoPhaseIterator = parentBitSet == null
? new RoutingPartitionedDocIdSetIterator(visitor)
diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java
index 6c8ad5500a2d3..eb813fa2f62e0 100644
--- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java
+++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java
@@ -216,7 +216,7 @@ public StoreFileMetadata metadata() {
* Checks if a file in a store is the same file
*
* @param md file in a store
- * @return true if file in a store this this file have the same checksum and length
+ * @return true if file in a store this file has the same checksum and length
*/
public boolean isSame(StoreFileMetadata md) {
return metadata.isSame(md);
@@ -226,7 +226,7 @@ public boolean isSame(StoreFileMetadata md) {
* Checks if a file in a store is the same file
*
* @param fileInfo file in a store
- * @return true if file in a store this this file have the same checksum and length
+ * @return true if file in a store this file has the same checksum and length
*/
public boolean isSame(FileInfo fileInfo) {
if (numberOfParts != fileInfo.numberOfParts) {
diff --git a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java
index e85939053e652..3f0911b8e8051 100644
--- a/server/src/main/java/org/opensearch/plugins/SearchPlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java
@@ -870,7 +870,7 @@ public SearchExtensionSpec(ParseField name, Writeable.Reader extends W> reader
/**
* Build the spec with a String.
*
- * @param name the name of the behavior. The parser and the reader are are registered under this name so be sure that that is the
+ * @param name the name of the behavior. The parser and the reader are registered under this name so be sure that is the
* name that W's {@link NamedWriteable#getWriteableName()} returns. It is an error if this name conflicts with another
* registered name, including names from other plugins.
* @param reader reader that reads the behavior from the internode protocol
diff --git a/server/src/main/java/org/opensearch/rest/action/RestActions.java b/server/src/main/java/org/opensearch/rest/action/RestActions.java
index b074a4bf4e01d..3dbe070912090 100644
--- a/server/src/main/java/org/opensearch/rest/action/RestActions.java
+++ b/server/src/main/java/org/opensearch/rest/action/RestActions.java
@@ -195,7 +195,7 @@ public static void buildNodesHeader(
}
/**
- * Automatically transform the {@link ToXContent}-compatible, nodes-level {@code response} into a a {@link BytesRestResponse}.
+ * Automatically transform the {@link ToXContent}-compatible, nodes-level {@code response} into a {@link BytesRestResponse}.
*
* This looks like:
*
diff --git a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java
index f94d5b13df286..6be77c2b7a88a 100644
--- a/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java
+++ b/server/src/main/java/org/opensearch/search/aggregations/bucket/terms/GlobalOrdinalsStringTermsAggregator.java
@@ -697,7 +697,7 @@ abstract class CollectionStrategy implements Releasable {
* @param owningBucketOrd the ordinal of the bucket that owns this collection
* @param doc the doc id in to collect
* @param globalOrd the global ordinal to collect
- * @param sub the sub-aggregators that that will collect the bucket data
+ * @param sub the sub-aggregators that will collect the bucket data
*/
abstract void collectGlobalOrd(long owningBucketOrd, int doc, long globalOrd, LeafBucketCollector sub) throws IOException;
diff --git a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java
index 74c73a6eed104..d2b79c514d3e2 100644
--- a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java
+++ b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java
@@ -320,7 +320,7 @@ protected FieldsVisitor createStoredFieldsVisitor(SearchContext context, Map
* This can be used to exclude high frequency terms from being
* suggested. High frequency terms are usually spelled correctly on top
- * of this this also improves the suggest performance.
+ * of this. This also improves the suggest performance.
*/
public DirectCandidateGeneratorBuilder maxTermFreq(float maxTermFreq) {
this.maxTermFreq = maxTermFreq;
diff --git a/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java b/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java
index 5af9116be2cd0..38f03af2466b5 100644
--- a/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java
+++ b/server/src/main/java/org/opensearch/search/suggest/term/TermSuggestionBuilder.java
@@ -300,8 +300,8 @@ public int maxInspections() {
* to {@code 0.01}.
*
* This can be used to exclude high frequency terms from being suggested.
- * High frequency terms are usually spelled correctly on top of this this
- * also improves the suggest performance.
+ * High frequency terms are usually spelled correctly. On top of this,
+ * this also improves the suggest performance.
*/
public TermSuggestionBuilder maxTermFreq(float maxTermFreq) {
if (maxTermFreq < 0.0f) {