[3/3] Remove the term "sanity" in comments.

Code references are not changed.

PiperOrigin-RevId: 334578493
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/DependencyModule.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/DependencyModule.java
index 7d9c429..a32aa2a 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/DependencyModule.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/DependencyModule.java
@@ -273,7 +273,7 @@
   private void collectDependenciesFromArtifact(Path path) throws IOException {
     try (BufferedInputStream bis = new BufferedInputStream(Files.newInputStream(path))) {
       Dependencies deps = Dependencies.parseFrom(bis);
-      // Sanity check to make sure we have a valid proto.
+      // Quick check to make sure we have a valid proto.
       if (!deps.hasRuleLabel()) {
         throw new IOException("Could not parse Deps.Dependencies message from proto.");
       }
diff --git a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
index 1e1dbbe..ee2f713 100644
--- a/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
+++ b/src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac/JavacTurbineTest.java
@@ -257,7 +257,7 @@
       assertThat(text).isEqualTo(Joiner.on('\n').join(expected));
     }
 
-    // sanity-check that annotation processing doesn't interfere with stripping
+    // Check that annotation processing doesn't interfere with stripping
     {
       String text = textify(outputs.get("Hello.class"));
       String[] expected = {
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/constraints/RuleContextConstraintSemantics.java b/src/main/java/com/google/devtools/build/lib/analysis/constraints/RuleContextConstraintSemantics.java
index a47b9fa..a6de036 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/constraints/RuleContextConstraintSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/constraints/RuleContextConstraintSemantics.java
@@ -240,8 +240,8 @@
 
     /**
      * Returns the environment and its group. An {@link Environment} rule only "supports" one
-     * environment: itself. Extract that from its more generic provider interface and sanity
-     * check that that's in fact what we see.
+     * environment: itself. Extract that from its more generic provider interface and check that
+     * it's in fact what we see.
      */
     private EnvironmentWithGroup resolveEnvironment(TransitiveInfoCollection envRule) {
       SupportedEnvironmentsProvider prereq =
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
index 502c323..b87b945 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/PatchUtil.java
@@ -626,7 +626,7 @@
           boolean isRenaming = isGitDiff && hasRenameFrom && hasRenameTo;
 
           if (!patchContent.isEmpty() || isRenaming || filePermission != -1) {
-            // We collected something useful, let's do some sanity checks before applying the patch.
+            // We collected something useful, let's do some checks before applying the patch.
             int patchStartLocation = i + 1 - patchContent.size();
 
             checkPatchContentIsComplete(
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/ninja/parser/NinjaParser.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/ninja/parser/NinjaParser.java
index c23bed9..d67beac 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/ninja/parser/NinjaParser.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/ninja/parser/NinjaParser.java
@@ -110,7 +110,7 @@
 
           // While the absolute offset is typed as long (because of larger ninja files), the
           // fragments are only at most Integer.MAX_VALUE long, so fragmentStart cannot be
-          // larger than that. Sanity check this here.
+          // larger than that. Check this here.
           if (fragmentStart > Integer.MAX_VALUE) {
             throw new GenericParsingException(
                 String.format(
diff --git a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxfsSandboxedSpawn.java b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxfsSandboxedSpawn.java
index 6ec3fc6..c594bcb 100644
--- a/src/main/java/com/google/devtools/build/lib/sandbox/SandboxfsSandboxedSpawn.java
+++ b/src/main/java/com/google/devtools/build/lib/sandbox/SandboxfsSandboxedSpawn.java
@@ -207,8 +207,8 @@
   @Override
   public void delete() {
     // We can only ask sandboxfs to unmap a sandbox if we successfully finished creating it.
-    // Otherwise, the request may fail, or we may fail our own sanity-checks that validate the
-    // lifecycle of the sandboxes.
+    // Otherwise, the request may fail, or we may fail our own checks that validate the lifecycle of
+    // the sandboxes.
     if (sandboxIsMapped) {
       try {
         process.destroySandbox(sandboxName);
diff --git a/src/test/java/com/google/devtools/build/android/dexer/DexFileMergerTest.java b/src/test/java/com/google/devtools/build/android/dexer/DexFileMergerTest.java
index e435efb..604a903 100644
--- a/src/test/java/com/google/devtools/build/android/dexer/DexFileMergerTest.java
+++ b/src/test/java/com/google/devtools/build/android/dexer/DexFileMergerTest.java
@@ -289,8 +289,8 @@
         }
       }
     }
-    assertThat(dexFiles.keySet().size()).isAtLeast(2); // test sanity
-    assertThat(dexFiles.size()).isAtLeast(1); // test sanity
+    assertThat(dexFiles.keySet().size()).isAtLeast(2);
+    assertThat(dexFiles.size()).isAtLeast(1);
     assertThat(dexFiles).hasSize(expectedClassCount);
     for (int i = 0; i < dexFiles.keySet().size(); ++i) {
       assertThat(dexFiles).containsKey(expectedDexFileName(i));
diff --git a/src/test/java/com/google/devtools/build/android/dexer/DexFileSplitterTest.java b/src/test/java/com/google/devtools/build/android/dexer/DexFileSplitterTest.java
index 98d081e..a933081 100644
--- a/src/test/java/com/google/devtools/build/android/dexer/DexFileSplitterTest.java
+++ b/src/test/java/com/google/devtools/build/android/dexer/DexFileSplitterTest.java
@@ -89,7 +89,7 @@
   public void testSingleInputMultidexOutput() throws Exception {
     Path dexArchive = buildDexArchive();
     ImmutableList<Path> outputArchives = runDexSplitter(200, "multidex_from_single", dexArchive);
-    assertThat(outputArchives.size()).isGreaterThan(1); // test sanity
+    assertThat(outputArchives.size()).isGreaterThan(1);
 
     ImmutableSet<String> expectedEntries = dexEntries(dexArchive);
     assertExpectedEntries(outputArchives, expectedEntries);
@@ -100,7 +100,7 @@
     Path dexArchive = buildDexArchive();
     Path dexArchive2 = buildDexArchive(INPUT_JAR2, "jar2.dex.zip");
     ImmutableList<Path> outputArchives = runDexSplitter(200, "multidex", dexArchive, dexArchive2);
-    assertThat(outputArchives.size()).isGreaterThan(1); // test sanity
+    assertThat(outputArchives.size()).isGreaterThan(1);
 
     HashSet<String> expectedEntries = new HashSet<>();
     expectedEntries.addAll(dexEntries(dexArchive));
@@ -117,7 +117,7 @@
     Path dexArchive = buildDexArchive();
     Path dexArchive2 = buildDexArchive(INPUT_JAR2, "jar2.dex.zip");
     ImmutableList<Path> outputArchives = runDexSplitter(200, "det1", dexArchive, dexArchive2);
-    assertThat(outputArchives.size()).isGreaterThan(1); // test sanity
+    assertThat(outputArchives.size()).isGreaterThan(1);
     ImmutableList<Path> outputArchives2 = runDexSplitter(200, "det2", dexArchive, dexArchive2);
     assertThat(outputArchives2).hasSize(outputArchives.size()); // paths differ though
 
@@ -156,7 +156,7 @@
             dexArchive);
 
     ImmutableSet<String> expectedEntries = dexEntries(dexArchive);
-    assertThat(outputArchives.size()).isGreaterThan(1); // test sanity
+    assertThat(outputArchives.size()).isGreaterThan(1);
     assertThat(dexEntries(outputArchives.get(0)))
         .containsAtLeastElementsIn(expectedMainDexEntries());
     assertExpectedEntries(outputArchives, expectedEntries);
@@ -194,7 +194,7 @@
             dexArchive);
 
     ImmutableSet<String> expectedEntries = dexEntries(dexArchive);
-    assertThat(outputArchives.size()).isGreaterThan(1); // test sanity
+    assertThat(outputArchives.size()).isGreaterThan(1);
     assertThat(dexEntries(outputArchives.get(0)))
         .containsExactlyElementsIn(expectedMainDexEntries());
     assertExpectedEntries(outputArchives, expectedEntries);
@@ -278,7 +278,7 @@
               .map(ZipEntryName.INSTANCE)
               .filter(Predicates.containsPattern(".*\\.class.dex$"))
               .collect(ImmutableSet.<String>toImmutableSet());
-      assertThat(result).isNotEmpty(); // test sanity
+      assertThat(result).isNotEmpty();
       return result;
     }
   }
diff --git a/src/test/java/com/google/devtools/build/android/junctions/WindowsJunctionCreatorTest.java b/src/test/java/com/google/devtools/build/android/junctions/WindowsJunctionCreatorTest.java
index 22ea0f2..38eb572 100644
--- a/src/test/java/com/google/devtools/build/android/junctions/WindowsJunctionCreatorTest.java
+++ b/src/test/java/com/google/devtools/build/android/junctions/WindowsJunctionCreatorTest.java
@@ -70,7 +70,7 @@
         assertThat((Object) jc.create(file)).isEqualTo(fileViaJunc);
         // Assert that the junction now exists.
         assertThat(junc.toFile().exists()).isTrue();
-        // Sanity check: the `file` should still exist.
+        // Assert that `file` should still exist.
         assertThat(file.toFile().exists()).isTrue();
         // Assert that the junction indeed points to `dir`, by asserting the existence of `file`
         // through the junction.
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AspectTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AspectTest.java
index 5383cd9..f1a4d12 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AspectTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AspectTest.java
@@ -622,7 +622,7 @@
         "extra_action(name='xa', cmd='echo dont-care')",
         "action_listener(name='listener', mnemonics=['Mnemonic'], extra_actions=[':xa'])");
 
-    // Sanity check: //x:d injects an aspect which produces some extra-action.
+    // Check: //x:d injects an aspect which produces some extra-action.
     {
       AnalysisResult analysisResult = update("//x:d");
 
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
index bf05379..f3769e6 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/ConfigurationsForLateBoundTargetsTest.java
@@ -131,8 +131,8 @@
             SkyframeExecutorTestUtils.getExistingConfiguredTargets(
                 skyframeExecutor, Label.parseAbsolute("//foo:latebound_dep", ImmutableMap.of())));
     assertThat(getConfiguration(dep)).isEqualTo(getHostConfiguration());
-    // This is technically redundant, but slightly stronger in sanity checking that the host
-    // configuration doesn't happen to match what the patch would have done.
+    // This is technically redundant, but slightly stronger in checking that the host configuration
+    // doesn't happen to match what the patch would have done.
     assertThat(LateBoundSplitUtil.getOptions(getConfiguration(dep)).fooFlag).isEmpty();
   }
 }
diff --git a/src/test/java/com/google/devtools/build/lib/concurrent/MultisetSemaphoreTest.java b/src/test/java/com/google/devtools/build/lib/concurrent/MultisetSemaphoreTest.java
index 6e8cb8d..f307d77 100644
--- a/src/test/java/com/google/devtools/build/lib/concurrent/MultisetSemaphoreTest.java
+++ b/src/test/java/com/google/devtools/build/lib/concurrent/MultisetSemaphoreTest.java
@@ -160,7 +160,7 @@
       Thread.currentThread().interrupt();
       throw new InterruptedException();
     }
-    // And the counters we used for sanity checks were correctly reset to 0.
+    // And the counters were correctly reset to 0.
     assertThat(numThreadsJustAfterAcquireInFirstRound.get()).isEqualTo(0);
     assertThat(numThreadsJustAfterAcquireInSecondRound.get()).isEqualTo(0);
     // And all M Runnables completed the second round.
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTestBase.java b/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTestBase.java
index d4e70ba..a7f50a3 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTestBase.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTestBase.java
@@ -454,7 +454,7 @@
     assertThat(getConfiguredTarget("//java/com/google/android/foo:foo")).isNotNull();
     // the package_group is busted, so we would have failed to get this far if we depended on it
     assertNoEvents();
-    // sanity check time: does this test actually test what we're testing for?
+    // NOTE: someone should verify that this test actually does what we think it does.
     reporter.removeHandler(failFastHandler);
     assertThat(getConfiguredTarget("//tools/allowlists/config_feature_flag:config_feature_flag"))
         .isNull();
diff --git a/src/test/java/com/google/devtools/build/lib/sandbox/BaseRealSandboxfsProcessTest.java b/src/test/java/com/google/devtools/build/lib/sandbox/BaseRealSandboxfsProcessTest.java
index 1a9d9df..7205d9f 100644
--- a/src/test/java/com/google/devtools/build/lib/sandbox/BaseRealSandboxfsProcessTest.java
+++ b/src/test/java/com/google/devtools/build/lib/sandbox/BaseRealSandboxfsProcessTest.java
@@ -34,7 +34,7 @@
  * Common code to unit test {@link RealSandboxfsProcess}.
  *
  * <p>These tests validate the communication protocol between Bazel and a sandboxfs but do so using
- * golden data. They are meant to sanity-check changes to the Bazel codebase against all supported
+ * golden data. They are meant to smoke-test changes to the Bazel codebase against all supported
  * sandboxfs versions but cannot guarantee that the integration with a real sandboxfs binary work.
  */
 public abstract class BaseRealSandboxfsProcessTest {
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
index 8ebb836..464359b 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
@@ -600,7 +600,7 @@
     /* **** Tests for files and directory contents ****/
 
     // Test that file contents matter. This is covered by existing tests already,
-    // so it's just a sanity check.
+    // so it's just a simple check.
     FileSystemUtils.writeContentAsLatin1(file11.getPath(), "goodbye");
     assertThat(
             new FilesystemValueChecker(
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeAwareActionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeAwareActionTest.java
index 2e6cbb6..ff1e7bc 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeAwareActionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/SkyframeAwareActionTest.java
@@ -376,7 +376,7 @@
     }
   }
 
-  /** Sanity check: ensure that a file's ctime was updated from an older value. */
+  /** Ensure that a file's ctime was updated from an older value. */
   private static void checkCtimeUpdated(Path path, long oldCtime) throws IOException {
     if (oldCtime >= path.stat().getLastChangeTime()) {
       throw new IllegalStateException(String.format("path=(%s), ctime=(%d)", path, oldCtime));
@@ -398,7 +398,6 @@
       // than the time at the setCommandStartTime() call. Therefore setting
       // System.currentTimeMillis() is guaranteed to advance the file's ctime.
       path.setLastModifiedTime(System.currentTimeMillis());
-      // Sanity check: ensure that updating the file's mtime indeed advanced its ctime.
       checkCtimeUpdated(path, ctime);
     }
 
@@ -407,7 +406,6 @@
       // Ensure enough time elapsed for file updates to have a visible effect on the file's ctime.
       TimestampGranularityUtils.waitForTimestampGranularity(ctime, reporter.getOutErr());
       appendToFile(path);
-      // Sanity check: ensure that appending to the file indeed advanced its ctime.
       checkCtimeUpdated(path, ctime);
     }
 
@@ -454,7 +452,7 @@
         null,
         /* trustRemoteArtifacts= */ false);
 
-    // Sanity check that our invalidation receiver is working correctly. We'll rely on it again.
+    // Check that our invalidation receiver is working correctly. We'll rely on it again.
     SkyKey actionKey = ActionLookupData.create(ACTION_LOOKUP_KEY, 0);
     TrackingEvaluationProgressReceiver.EvaluatedEntry evaluatedAction =
         progressReceiver.getEvalutedEntry(actionKey);
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/packages/BazelPackageLoaderTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/packages/BazelPackageLoaderTest.java
index dd12263..53d3112 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/packages/BazelPackageLoaderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/packages/BazelPackageLoaderTest.java
@@ -37,8 +37,8 @@
 /**
  * Simple tests for {@link BazelPackageLoader}.
  *
- * <p>Bazel's unit and integration tests do sanity checks with {@link BazelPackageLoader} under the
- * covers, so we get pretty exhaustive correctness tests for free.
+ * <p>Bazel's unit and integration tests do consistency checks with {@link BazelPackageLoader} under
+ * the covers, so we get pretty exhaustive correctness tests for free.
  */
 @RunWith(JUnit4.class)
 public final class BazelPackageLoaderTest extends AbstractPackageLoaderTest {
diff --git a/src/test/java/com/google/devtools/build/lib/util/StringUtilitiesTest.java b/src/test/java/com/google/devtools/build/lib/util/StringUtilitiesTest.java
index 0b09fa6..519f35d 100644
--- a/src/test/java/com/google/devtools/build/lib/util/StringUtilitiesTest.java
+++ b/src/test/java/com/google/devtools/build/lib/util/StringUtilitiesTest.java
@@ -52,7 +52,7 @@
 
   // Tests of StringUtilities.combineKeys()
 
-  /** Simple sanity test of format */
+  /** Simple test of format */
   @Test
   public void combineKeysFormat() {
     assertThat(combineKeys("a", "b!c", "<d>")).isEqualTo("<a><b!!c><!<d!>>");
diff --git a/src/test/java/com/google/devtools/build/lib/util/io/StreamMultiplexerParallelStressTest.java b/src/test/java/com/google/devtools/build/lib/util/io/StreamMultiplexerParallelStressTest.java
index 0c99a16..5b4793f 100644
--- a/src/test/java/com/google/devtools/build/lib/util/io/StreamMultiplexerParallelStressTest.java
+++ b/src/test/java/com/google/devtools/build/lib/util/io/StreamMultiplexerParallelStressTest.java
@@ -14,11 +14,6 @@
 package com.google.devtools.build.lib.util.io;
 
 import com.google.common.io.ByteStreams;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
 import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.List;
@@ -28,6 +23,9 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
 
 /**
  * Exercise {@link StreamMultiplexer} in a parallel setting and ensure there's
@@ -43,11 +41,10 @@
   char[] toughCharsToTry = {'\n', '@', '1', '2', '\0', '0'};
 
   /**
-   * We use a demultiplexer as a simple sanity checker only - that is, we don't
-   * care what the demultiplexer writes, but we are taking advantage of its
-   * built in error checking.
+   * We use a demultiplexer as a simple checker only - that is, we don't care what the demultiplexer
+   * writes, but we are taking advantage of its built in error checking.
    */
-  OutputStream devNull  = ByteStreams.nullOutputStream();
+  OutputStream devNull = ByteStreams.nullOutputStream();
 
   StreamDemultiplexer demux = new StreamDemultiplexer((byte) 1, devNull, devNull, devNull);
 
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/PathAbstractTest.java b/src/test/java/com/google/devtools/build/lib/vfs/PathAbstractTest.java
index a52a592f..cdf25e6 100644
--- a/src/test/java/com/google/devtools/build/lib/vfs/PathAbstractTest.java
+++ b/src/test/java/com/google/devtools/build/lib/vfs/PathAbstractTest.java
@@ -62,7 +62,7 @@
     String normal1 = "/a/b/hello.txt";
     assertThat(create(normal1).getPathString()).isSameInstanceAs(normal1);
 
-    // Sanity check our testing strategy
+    // Check our testing strategy
     String notNormal = "/a/../b";
     assertThat(create(notNormal).getPathString()).isNotSameInstanceAs(notNormal);
   }
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/WindowsPathTest.java b/src/test/java/com/google/devtools/build/lib/vfs/WindowsPathTest.java
index 39208db..a27e7e7 100644
--- a/src/test/java/com/google/devtools/build/lib/vfs/WindowsPathTest.java
+++ b/src/test/java/com/google/devtools/build/lib/vfs/WindowsPathTest.java
@@ -137,7 +137,7 @@
     assertThat(osPathPolicy.needsToNormalize("will~1.exi"))
         .isEqualTo(WindowsOsPathPolicy.NEEDS_SHORT_PATH_NORMALIZATION);
     assertThat(osPathPolicy.needsToNormalize("d:/no-normalization"))
-        .isEqualTo(WindowsOsPathPolicy.NORMALIZED); // Sanity check
+        .isEqualTo(WindowsOsPathPolicy.NORMALIZED);
   }
 
   private static String normalize(OsPathPolicy osPathPolicy, String str) {