Merge "Compare scrubbed strings when uncommitting LogUnits"
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index d17d6d1..39236da 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -863,7 +863,10 @@
         // Check that expected word matches.
         if (oldLogUnit != null) {
             final String oldLogUnitWords = oldLogUnit.getWordsAsString();
-            if (oldLogUnitWords != null && !oldLogUnitWords.equals(expectedWord)) {
+            // Because the word is stored in the LogUnit with digits scrubbed, the comparison must
+            // be made on a scrubbed version of the expectedWord as well.
+            if (oldLogUnitWords != null && !oldLogUnitWords.equals(
+                    scrubDigitsFromString(expectedWord))) {
                 return;
             }
         }