Rollback of commit 2a2be3907981d9654575493c7012d95d1241f373.

--
MOS_MIGRATED_REVID=140721733
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
index dae241b..97f113f 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java
@@ -1120,29 +1120,6 @@
   private final Map<String, OptionDetails> transitiveOptionsMap;
 
   /**
-   * Returns {@code true} if this configuration is semantically equal to the other, including
-   * checking that both have the same sets of fragments and options.
-   */
-  @Override
-  public boolean equals(Object other) {
-    if (this == other) {
-      return true;
-    } else if (!(other instanceof BuildConfiguration)) {
-      return false;
-    } else {
-      BuildConfiguration otherConfig = (BuildConfiguration) other;
-      return actionsEnabled == otherConfig.actionsEnabled
-          && fragments.values().equals(otherConfig.fragments.values())
-          && buildOptions.getOptions().equals(otherConfig.buildOptions.getOptions());
-    }
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(actionsEnabled, fragments, buildOptions.getOptions());
-  }
-
-  /**
    * Returns true if this configuration is semantically equal to the other, with
    * the possible exception that the other has fewer fragments.
    *
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
index d9dd9ae..9cf952c 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
@@ -426,7 +426,7 @@
    */
   protected final void createBuildView() throws Exception {
     Preconditions.checkNotNull(masterConfig);
-    Preconditions.checkState(getHostConfiguration().equals(getTargetConfiguration())
+    Preconditions.checkState(getHostConfiguration() == getTargetConfiguration()
         || getHostConfiguration().isHostConfiguration(),
         "Host configuration %s is not a host configuration' "
         + "and does not match target configuration %s",