From f116f9103377866c3a1e5d2b03907bbfead2970b Mon Sep 17 00:00:00 2001
From: Adrian Velicu <adrianv@google.com>
Date: Wed, 17 Sep 2014 17:32:43 +0900
Subject: [PATCH] Making spelling of the word "distracters" consistent

Bug: 17537869
Change-Id: Ibfc1c84aff72aeb76c9b127503369d00f3dfaceb
---
 java/src/com/android/inputmethod/latin/Suggest.java  |  2 +-
 ...cterFilterCheckingExactMatchesAndSuggestions.java | 12 ++++++------
 .../latin/utils/DistracterFilterTest.java            |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 9bf017578b..4ad5ba65eb 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -235,7 +235,7 @@ public final class Suggest {
         SuggestedWordInfo.removeDups(null /* typedWord */, suggestionsContainer);
 
         // For some reason some suggestions with MIN_VALUE are making their way here.
-        // TODO: Find a more robust way to detect distractors.
+        // TODO: Find a more robust way to detect distracters.
         for (int i = suggestionsContainer.size() - 1; i >= 0; --i) {
             if (suggestionsContainer.get(i).mScore < SUPPRESS_SUGGEST_THRESHOLD) {
                 suggestionsContainer.remove(i);
diff --git a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
index 1db5255023..f8a8453045 100644
--- a/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
+++ b/java/src/com/android/inputmethod/latin/utils/DistracterFilterCheckingExactMatchesAndSuggestions.java
@@ -64,9 +64,9 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
     private final Object mLock = new Object();
 
     // If the score of the top suggestion exceeds this value, the tested word (e.g.,
-    // an OOV, a misspelling, or an in-vocabulary word) would be considered as a distractor to
+    // an OOV, a misspelling, or an in-vocabulary word) would be considered as a distracter to
     // words in dictionary. The greater the threshold is, the less likely the tested word would
-    // become a distractor, which means the tested word will be more likely to be added to
+    // become a distracter, which means the tested word will be more likely to be added to
     // the dictionary.
     private static final float DISTRACTER_WORD_SCORE_THRESHOLD = 0.4f;
 
@@ -196,7 +196,7 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
         }
         final boolean Word = dictionaryFacilitator.isValidWord(testedWord, false /* ignoreCase */);
         if (Word) {
-            // Valid word is not a distractor.
+            // Valid word is not a distracter.
             if (DEBUG) {
                 Log.d(TAG, "isDistracter: false (valid word)");
             }
@@ -257,12 +257,12 @@ public class DistracterFilterCheckingExactMatchesAndSuggestions implements Distr
             return false;
         }
         final SuggestedWordInfo firstSuggestion = suggestionResults.first();
-        final boolean isDistractor = suggestionExceedsDistracterThreshold(
+        final boolean isDistracter = suggestionExceedsDistracterThreshold(
                 firstSuggestion, consideredWord, DISTRACTER_WORD_SCORE_THRESHOLD);
         if (DEBUG) {
-            Log.d(TAG, "isDistracter: " + isDistractor);
+            Log.d(TAG, "isDistracter: " + isDistracter);
         }
-        return isDistractor;
+        return isDistracter;
     }
 
     private static boolean suggestionExceedsDistracterThreshold(final SuggestedWordInfo suggestion,
diff --git a/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java b/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
index 5fbd36ac7e..6ed912088c 100644
--- a/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
+++ b/tests/src/com/android/inputmethod/latin/utils/DistracterFilterTest.java
@@ -57,7 +57,7 @@ public class DistracterFilterTest extends AndroidTestCase {
         mDistracterFilter.close();
     }
 
-    public void testIsDistractorToWordsInDictionaries() {
+    public void testIsDistracterToWordsInDictionaries() {
         final PrevWordsInfo EMPTY_PREV_WORDS_INFO = PrevWordsInfo.EMPTY_PREV_WORDS_INFO;
 
         final Locale localeEnUs = new Locale("en", "US");
-- 
GitLab