diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 2d958e1..f4c8e61 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -135,11 +135,12 @@
         }
     }
 
-    // proximityInfo may not be null.
+    // proximityInfo and/or prevWordForBigrams may not be null.
     @Override
-    public void getWords(final WordComposer codes, final WordCallback callback,
-            final ProximityInfo proximityInfo) {
-        final int count = getSuggestions(codes, proximityInfo, mOutputChars, mScores);
+    public void getWords(final WordComposer codes, final CharSequence prevWordForBigrams,
+            final WordCallback callback, final ProximityInfo proximityInfo) {
+        final int count = getSuggestions(codes, prevWordForBigrams, proximityInfo, mOutputChars,
+                mScores);
 
         for (int j = 0; j < count; ++j) {
             if (mScores[j] < 1) break;
@@ -161,7 +162,8 @@
 
     // proximityInfo may not be null.
     /* package for test */ int getSuggestions(final WordComposer codes,
-            final ProximityInfo proximityInfo, char[] outputChars, int[] scores) {
+            final CharSequence prevWordForBigrams, final ProximityInfo proximityInfo,
+            char[] outputChars, int[] scores) {
         if (!isValidDictionary()) return -1;
 
         final int codesSize = codes.size();
@@ -175,6 +177,7 @@
         Arrays.fill(outputChars, (char) 0);
         Arrays.fill(scores, 0);
 
+        // TODO: pass the previous word to native code
         return getSuggestionsNative(
                 mNativeDict, proximityInfo.getNativeProximityInfo(),
                 codes.getXCoordinates(), codes.getYCoordinates(), mInputCodes, codesSize,
diff --git a/java/src/com/android/inputmethod/latin/Dictionary.java b/java/src/com/android/inputmethod/latin/Dictionary.java
index 9d26a23..a405aa4 100644
--- a/java/src/com/android/inputmethod/latin/Dictionary.java
+++ b/java/src/com/android/inputmethod/latin/Dictionary.java
@@ -61,11 +61,13 @@
      * Searches for words in the dictionary that match the characters in the composer. Matched
      * words are added through the callback object.
      * @param composer the key sequence to match
+     * @param prevWordForBigrams the previous word, or null if none
      * @param callback the callback object to send matched words to as possible candidates
      * @param proximityInfo the object for key proximity. May be ignored by some implementations.
      * @see WordCallback#addWord(char[], int, int, int, int, int)
      */
-    abstract public void getWords(final WordComposer composer, final WordCallback callback,
+    abstract public void getWords(final WordComposer composer,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo);
 
     /**
diff --git a/java/src/com/android/inputmethod/latin/DictionaryCollection.java b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
index 5de770a..37deb0c 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryCollection.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
@@ -50,10 +50,10 @@
     }
 
     @Override
-    public void getWords(final WordComposer composer, final WordCallback callback,
-            final ProximityInfo proximityInfo) {
+    public void getWords(final WordComposer composer, final CharSequence prevWordForBigrams,
+            final WordCallback callback, final ProximityInfo proximityInfo) {
         for (final Dictionary dict : mDictionaries)
-            dict.getWords(composer, callback, proximityInfo);
+            dict.getWords(composer, prevWordForBigrams, callback, proximityInfo);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index 53e8b74..7d2ccdf 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -173,20 +173,21 @@
     }
 
     @Override
-    public void getWords(final WordComposer codes, final WordCallback callback,
-            final ProximityInfo proximityInfo) {
+    public void getWords(final WordComposer codes, final CharSequence prevWordForBigrams,
+            final WordCallback callback, final ProximityInfo proximityInfo) {
         asyncReloadDictionaryIfRequired();
-        getWordsInner(codes, callback, proximityInfo);
+        getWordsInner(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
-    protected final void getWordsInner(final WordComposer codes, final WordCallback callback,
+    protected final void getWordsInner(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo) {
         // Ensure that there are no concurrent calls to getWords. If there are, do nothing and
         // return.
         if (mLocalDictionaryController.tryLock()) {
             try {
                 if (mBinaryDictionary != null) {
-                    mBinaryDictionary.getWords(codes, callback, proximityInfo);
+                    mBinaryDictionary.getWords(codes, prevWordForBigrams, callback, proximityInfo);
                 }
             } finally {
                 mLocalDictionaryController.unlock();
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
index 46d11fa..fe21ebe 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -192,8 +192,8 @@
     }
 
     @Override
-    public void getWords(final WordComposer codes, final WordCallback callback,
-            final ProximityInfo proximityInfo) {
+    public void getWords(final WordComposer codes, final CharSequence prevWordForBigrams,
+            final WordCallback callback, final ProximityInfo proximityInfo) {
         synchronized (mUpdatingLock) {
             // If we need to update, start off a background task
             if (mRequiresReload) startDictionaryLoadingTaskLocked();
@@ -203,10 +203,11 @@
         if (codes.size() >= BinaryDictionary.MAX_WORD_LENGTH) {
             return;
         }
-        getWordsInner(codes, callback, proximityInfo);
+        getWordsInner(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
-    protected final void getWordsInner(final WordComposer codes, final WordCallback callback,
+    protected final void getWordsInner(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             @SuppressWarnings("unused") final ProximityInfo proximityInfo) {
         mInputLength = codes.size();
         if (mCodes.length < mInputLength) mCodes = new int[mInputLength][];
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index caa7f93..b30d1e3 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1817,7 +1817,8 @@
     }
 
     @Override
-    public void pickSuggestionManually(final int index, final CharSequence suggestion) {
+    public void pickSuggestionManually(final int index, final CharSequence suggestion,
+            int x, int y) {
         final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions();
 
         if (SPACE_STATE_PHANTOM == mSpaceState && suggestion.length() > 0) {
@@ -1840,6 +1841,10 @@
             if (ic != null) {
                 final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index];
                 ic.commitCompletion(completionInfo);
+                if (ProductionFlag.IS_EXPERIMENTAL) {
+                    ResearchLogger.latinIME_pickApplicationSpecifiedCompletion(index,
+                            completionInfo.getText(), x, y);
+                }
             }
             return;
         }
@@ -1850,6 +1855,9 @@
             // So, LatinImeLogger logs "" as a user's input.
             LatinImeLogger.logOnManualSuggestion("", suggestion.toString(), index, suggestedWords);
             // Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
+            if (ProductionFlag.IS_EXPERIMENTAL) {
+                ResearchLogger.latinIME_punctuationSuggestion(index, suggestion, x, y);
+            }
             final int primaryCode = suggestion.charAt(0);
             onCodeInput(primaryCode,
                     KeyboardActionListener.SUGGESTION_STRIP_COORDINATE,
@@ -1858,8 +1866,12 @@
         }
         // We need to log before we commit, because the word composer will store away the user
         // typed word.
-        LatinImeLogger.logOnManualSuggestion(mWordComposer.getTypedWord().toString(),
+        final String replacedWord = mWordComposer.getTypedWord().toString();
+        LatinImeLogger.logOnManualSuggestion(replacedWord,
                 suggestion.toString(), index, suggestedWords);
+        if (ProductionFlag.IS_EXPERIMENTAL) {
+            ResearchLogger.latinIME_pickSuggestionManually(replacedWord, index, suggestion, x, y);
+        }
         mExpectingUpdateSelection = true;
         commitChosenWord(suggestion, LastComposedWord.COMMIT_TYPE_MANUAL_PICK,
                 LastComposedWord.NOT_A_SEPARATOR);
diff --git a/java/src/com/android/inputmethod/latin/ResearchLogger.java b/java/src/com/android/inputmethod/latin/ResearchLogger.java
index 4e90dd6..27f2e2a 100644
--- a/java/src/com/android/inputmethod/latin/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/latin/ResearchLogger.java
@@ -375,6 +375,10 @@
         private static final boolean SUDDENJUMPINGTOUCHEVENTHANDLER_ONTOUCHEVENT_ENABLED
                 = DEFAULT_ENABLED;
         private static final boolean SUGGESTIONSVIEW_SETSUGGESTIONS_ENABLED = DEFAULT_ENABLED;
+        private static final boolean LATINIME_PICKAPPLICATIONSPECIFIEDCOMPLETION_ENABLED
+                = DEFAULT_ENABLED;
+        private static final boolean LATINIME_PICKPUNCTUATIONSUGGESTION_ENABLED = DEFAULT_ENABLED;
+        private static final boolean LATINIME_PICKSUGGESTIONMANUALLY_ENABLED = DEFAULT_ENABLED;
     }
 
     public static void logUnstructured(String logGroup, final String details) {
@@ -633,6 +637,30 @@
         }
     }
 
+    public static void latinIME_pickApplicationSpecifiedCompletion(final int index,
+            final CharSequence text, int x, int y) {
+        if (UnsLogGroup.LATINIME_PICKAPPLICATIONSPECIFIEDCOMPLETION_ENABLED) {
+            final String s = String.valueOf(index) + '\t' + text + '\t' + x + '\t' + y;
+            logUnstructured("latinIME_pickApplicationSpecifiedCompletion", s);
+        }
+    }
+
+    public static void latinIME_pickSuggestionManually(final String replacedWord,
+            final int index, CharSequence suggestion, int x, int y) {
+        if (UnsLogGroup.LATINIME_PICKSUGGESTIONMANUALLY_ENABLED) {
+            final String s = String.valueOf(index) + '\t' + suggestion + '\t' + x + '\t' + y;
+            logUnstructured("latinIME_pickSuggestionManually", s);
+        }
+    }
+
+    public static void latinIME_punctuationSuggestion(final int index,
+            final CharSequence suggestion, int x, int y) {
+        if (UnsLogGroup.LATINIME_PICKPUNCTUATIONSUGGESTION_ENABLED) {
+            final String s = String.valueOf(index) + '\t' + suggestion + '\t' + x + '\t' + y;
+            logUnstructured("latinIME_pickPunctuationSuggestion", s);
+        }
+    }
+
     public static void latinIME_switchToKeyboardView() {
         if (UnsLogGroup.LATINIME_SWITCHTOKEYBOARDVIEW_ENABLED) {
             final String s = "Switch to keyboard view.";
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 51ebfda..86753e2 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -340,7 +340,7 @@
                 if (key.equals(DICT_KEY_USER_HISTORY_UNIGRAM) || key.equals(DICT_KEY_WHITELIST))
                     continue;
                 final Dictionary dictionary = mUnigramDictionaries.get(key);
-                dictionary.getWords(wordComposerForLookup, this, proximityInfo);
+                dictionary.getWords(wordComposerForLookup, prevWordForBigram, this, proximityInfo);
             }
         }
 
diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
index 80825a8..188259f 100644
--- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsBinaryDictionary.java
@@ -30,10 +30,11 @@
     }
 
     @Override
-    public synchronized void getWords(final WordComposer codes, final WordCallback callback,
+    public synchronized void getWords(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo) {
         syncReloadDictionaryIfRequired();
-        getWordsInner(codes, callback, proximityInfo);
+        getWordsInner(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsDictionary.java
index 444c7f5..a8b871c 100644
--- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsDictionary.java
+++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedContactsDictionary.java
@@ -29,10 +29,11 @@
     }
 
     @Override
-    public synchronized void getWords(final WordComposer codes, final WordCallback callback,
+    public synchronized void getWords(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo) {
         blockingReloadDictionaryIfRequired();
-        getWordsInner(codes, callback, proximityInfo);
+        getWordsInner(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserDictionary.java b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserDictionary.java
index e52b46a..50e8b24 100644
--- a/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserDictionary.java
+++ b/java/src/com/android/inputmethod/latin/SynchronouslyLoadedUserDictionary.java
@@ -32,10 +32,11 @@
     }
 
     @Override
-    public synchronized void getWords(final WordComposer codes, final WordCallback callback,
+    public synchronized void getWords(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo) {
         blockingReloadDictionaryIfRequired();
-        getWordsInner(codes, callback, proximityInfo);
+        getWordsInner(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/UserDictionary.java b/java/src/com/android/inputmethod/latin/UserDictionary.java
index 51b9933..6beeaac 100644
--- a/java/src/com/android/inputmethod/latin/UserDictionary.java
+++ b/java/src/com/android/inputmethod/latin/UserDictionary.java
@@ -174,9 +174,10 @@
     }
 
     @Override
-    public synchronized void getWords(final WordComposer codes, final WordCallback callback,
+    public synchronized void getWords(final WordComposer codes,
+            final CharSequence prevWordForBigrams, final WordCallback callback,
             final ProximityInfo proximityInfo) {
-        super.getWords(codes, callback, proximityInfo);
+        super.getWords(codes, prevWordForBigrams, callback, proximityInfo);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index 44dac30..34e214d 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -588,7 +588,7 @@
                 try {
                     dictInfo = mDictionaryPool.takeOrGetNull();
                     if (null == dictInfo) return getNotInDictEmptySuggestions();
-                    dictInfo.mDictionary.getWords(composer, suggestionsGatherer,
+                    dictInfo.mDictionary.getWords(composer, null, suggestionsGatherer,
                             dictInfo.mProximityInfo);
                     isInDict = dictInfo.mDictionary.isValidWord(text);
                     if (!isInDict && CAPITALIZE_NONE != capitalizeType) {
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index 01d51d4..4e14104 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -72,7 +72,7 @@
         OnLongClickListener {
     public interface Listener {
         public boolean addWordToDictionary(String word);
-        public void pickSuggestionManually(int index, CharSequence word);
+        public void pickSuggestionManually(int index, CharSequence word, int x, int y);
     }
 
     // The maximum number of suggestions available. See {@link Suggest#mPrefMaxSuggestions}.
@@ -717,7 +717,9 @@
         public boolean onCustomRequest(int requestCode) {
             final int index = requestCode;
             final CharSequence word = mSuggestedWords.getWord(index);
-            mListener.pickSuggestionManually(index, word);
+            // TODO: change caller path so coordinates are passed through here
+            mListener.pickSuggestionManually(index, word, NOT_A_TOUCH_COORDINATE,
+                    NOT_A_TOUCH_COORDINATE);
             dismissMoreSuggestions();
             return true;
         }
@@ -867,7 +869,7 @@
             return;
 
         final CharSequence word = mSuggestedWords.getWord(index);
-        mListener.pickSuggestionManually(index, word);
+        mListener.pickSuggestionManually(index, word, mLastX, mLastY);
     }
 
     @Override
diff --git a/native/jni/src/bigram_dictionary.cpp b/native/jni/src/bigram_dictionary.cpp
index 87ca1e9..320b0af 100644
--- a/native/jni/src/bigram_dictionary.cpp
+++ b/native/jni/src/bigram_dictionary.cpp
@@ -30,7 +30,6 @@
     : DICT(dict), MAX_WORD_LENGTH(maxWordLength), mParentDictionary(parentDictionary) {
     if (DEBUG_DICT) {
         AKLOGI("BigramDictionary - constructor");
-        AKLOGI("Has Bigram : %d", hasBigram);
     }
 }
 
@@ -109,6 +108,8 @@
 
     const uint8_t* const root = DICT;
     int pos = getBigramListForWord(root, prevWord, prevWordLength);
+    // getBigramListForWord returns 0 if this word is not in the dictionary or has no bigrams
+    if (0 == pos) return 0;
     int bigramFlags;
     int bigramCount = 0;
     do {
@@ -130,6 +131,8 @@
     return bigramCount;
 }
 
+// Returns a pointer to the start of the bigram list.
+// If the word is not found or has no bigrams, this function returns 0.
 int BigramDictionary::getBigramListForWord(const uint8_t* const root,
         const unsigned short *prevWord, const int prevWordLength) {
     int pos = BinaryFormat::getTerminalPosition(root, prevWord, prevWordLength);
diff --git a/native/jni/src/dictionary.h b/native/jni/src/dictionary.h
index 5638bbf..66a5c21 100644
--- a/native/jni/src/dictionary.h
+++ b/native/jni/src/dictionary.h
@@ -58,8 +58,6 @@
     static int wideStrLen(unsigned short *str);
 
  private:
-    bool hasBigram();
-
     const unsigned char *mDict;
 
     // Used only for the mmap version of dictionary loading, but we use these as dummy variables
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTests.java b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
index 11eb6ab..6c3cb16 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTests.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTests.java
@@ -30,7 +30,7 @@
         final String WORD_TO_TYPE = "this";
         final String EXPECTED_RESULT = "this";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1);
         type(Keyboard.CODE_DELETE);
         assertEquals("press suggestion then backspace", EXPECTED_RESULT,
@@ -44,7 +44,7 @@
         type(WORD_TO_TYPE);
         // Choose the auto-correction, which is always in position 0. For "tgis", the
         // auto-correction should be "this".
-        mLatinIME.pickSuggestionManually(0, WORD_TO_PICK);
+        pickSuggestionManually(0, WORD_TO_PICK);
         mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1);
         assertEquals("pick typed word over auto-correction then backspace", WORD_TO_PICK,
                 mTextView.getText().toString());
@@ -59,7 +59,7 @@
         type(WORD_TO_TYPE);
         // Choose the typed word, which should be in position 1 (because position 0 should
         // be occupied by the "this" auto-correction, as checked by testAutoCorrect())
-        mLatinIME.pickSuggestionManually(1, WORD_TO_TYPE);
+        pickSuggestionManually(1, WORD_TO_TYPE);
         mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1);
         assertEquals("pick typed word over auto-correction then backspace", WORD_TO_TYPE,
                 mTextView.getText().toString());
@@ -75,7 +75,7 @@
         type(WORD_TO_TYPE);
         // Choose the second suggestion, which should be in position 2 and should be "thus"
         // when "tgis is typed.
-        mLatinIME.pickSuggestionManually(2, WORD_TO_PICK);
+        pickSuggestionManually(2, WORD_TO_PICK);
         mLatinIME.onUpdateSelection(0, 0, WORD_TO_TYPE.length(), WORD_TO_TYPE.length(), -1, -1);
         assertEquals("pick different suggestion then backspace", WORD_TO_PICK,
                 mTextView.getText().toString());
@@ -171,7 +171,7 @@
         final String WORD_TO_TYPE = "this";
         final String EXPECTED_RESULT = WORD_TO_TYPE;
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         assertEquals("no space after manual pick", EXPECTED_RESULT,
                 mTextView.getText().toString());
     }
@@ -181,7 +181,7 @@
         final String WORD2_TO_TYPE = "is";
         final String EXPECTED_RESULT = "this is";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
         type(WORD2_TO_TYPE);
         assertEquals("manual pick then type", EXPECTED_RESULT, mTextView.getText().toString());
     }
@@ -191,7 +191,7 @@
         final String WORD2_TO_TYPE = "!";
         final String EXPECTED_RESULT = "this!";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
         type(WORD2_TO_TYPE);
         assertEquals("manual pick then separator", EXPECTED_RESULT, mTextView.getText().toString());
     }
@@ -201,7 +201,7 @@
         final String WORD2_TO_TYPE = " is";
         final String EXPECTED_RESULT = "this is";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
         type(WORD2_TO_TYPE);
         assertEquals("manual pick then space then type", EXPECTED_RESULT,
                 mTextView.getText().toString());
@@ -212,11 +212,11 @@
         final String WORD2_TO_PICK = "is";
         final String EXPECTED_RESULT = "this is";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
         // Here we fake picking a word through bigram prediction. This test is taking
         // advantage of the fact that Latin IME blindly trusts the caller of #pickSuggestionManually
         // to actually pass the right string.
-        mLatinIME.pickSuggestionManually(1, WORD2_TO_PICK);
+        pickSuggestionManually(1, WORD2_TO_PICK);
         assertEquals("manual pick then manual pick", EXPECTED_RESULT,
                 mTextView.getText().toString());
     }
diff --git a/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java b/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java
index b2b9601..78143ac 100644
--- a/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java
+++ b/tests/src/com/android/inputmethod/latin/InputLogicTestsNonEnglish.java
@@ -33,7 +33,7 @@
         final String EXPECTED_RESULT = "test !";
         changeLanguage("fr");
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
         type(WORD2_TO_TYPE);
         assertEquals("manual pick then separator for French", EXPECTED_RESULT,
                 mTextView.getText().toString());
@@ -49,8 +49,8 @@
         runMessages();
         assertTrue("type word then type space should display punctuation strip",
                 mLatinIME.isShowingPunctuationList());
-        mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
-        mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+        pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+        pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
         assertEquals("type word then type space then punctuation from strip twice for French",
                 EXPECTED_RESULT, mTextView.getText().toString());
     }
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
index 991635e..838effe 100644
--- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java
+++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java
@@ -278,6 +278,11 @@
         waitForDictionaryToBeLoaded();
     }
 
+    protected void pickSuggestionManually(final int index, final CharSequence suggestion) {
+        mLatinIME.pickSuggestionManually(index, suggestion,
+                KeyboardActionListener.NOT_A_TOUCH_COORDINATE,
+                KeyboardActionListener.NOT_A_TOUCH_COORDINATE);
+    }
 
     // Helper to avoid writing the try{}catch block each time
     protected static void sleep(final int milliseconds) {
diff --git a/tests/src/com/android/inputmethod/latin/PunctuationTests.java b/tests/src/com/android/inputmethod/latin/PunctuationTests.java
index b907970..e1d4c46 100644
--- a/tests/src/com/android/inputmethod/latin/PunctuationTests.java
+++ b/tests/src/com/android/inputmethod/latin/PunctuationTests.java
@@ -38,8 +38,8 @@
             runMessages();
             assertTrue("type word then type space should display punctuation strip",
                     mLatinIME.isShowingPunctuationList());
-            mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
-            mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+            pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+            pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
             assertEquals("type word then type space then punctuation from strip twice",
                     EXPECTED_RESULT, mTextView.getText().toString());
         } finally {
@@ -62,9 +62,9 @@
         final String PUNCTUATION_FROM_STRIP = "!";
         final String EXPECTED_RESULT = "this!! is";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
-        mLatinIME.pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
+        pickSuggestionManually(0, PUNCTUATION_FROM_STRIP);
         type(WORD2_TO_TYPE);
         assertEquals("pick word then pick punctuation twice then type", EXPECTED_RESULT,
                 mTextView.getText().toString());
@@ -75,8 +75,8 @@
         final String WORD2_TO_PICK = "!is";
         final String EXPECTED_RESULT = "this!is";
         type(WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD1_TO_TYPE);
-        mLatinIME.pickSuggestionManually(1, WORD2_TO_PICK);
+        pickSuggestionManually(0, WORD1_TO_TYPE);
+        pickSuggestionManually(1, WORD2_TO_PICK);
         assertEquals("manual pick then manual pick a word with punct at start", EXPECTED_RESULT,
                 mTextView.getText().toString());
     }
@@ -86,7 +86,7 @@
         final String PUNCTUATION = ":";
         final String EXPECTED_RESULT = "this:";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         type(PUNCTUATION);
         assertEquals("manually pick word then colon",
                 EXPECTED_RESULT, mTextView.getText().toString());
@@ -97,7 +97,7 @@
         final String PUNCTUATION = "(";
         final String EXPECTED_RESULT = "this (";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         type(PUNCTUATION);
         assertEquals("manually pick word then open paren",
                 EXPECTED_RESULT, mTextView.getText().toString());
@@ -108,7 +108,7 @@
         final String PUNCTUATION = ")";
         final String EXPECTED_RESULT = "this)";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         type(PUNCTUATION);
         assertEquals("manually pick word then close paren",
                 EXPECTED_RESULT, mTextView.getText().toString());
@@ -119,7 +119,7 @@
         final String SPECIAL_KEY = ":-)";
         final String EXPECTED_RESULT = "this :-)";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         mLatinIME.onTextInput(SPECIAL_KEY);
         assertEquals("manually pick word then press the smiley key",
                 EXPECTED_RESULT, mTextView.getText().toString());
@@ -130,7 +130,7 @@
         final String SPECIAL_KEY = ".com";
         final String EXPECTED_RESULT = "this.com";
         type(WORD_TO_TYPE);
-        mLatinIME.pickSuggestionManually(0, WORD_TO_TYPE);
+        pickSuggestionManually(0, WORD_TO_TYPE);
         mLatinIME.onTextInput(SPECIAL_KEY);
         assertEquals("manually pick word then press the .com key",
                 EXPECTED_RESULT, mTextView.getText().toString());
