nus-yam/ex-repair huggingface dataset:
Program: 87462
Project: 87462
Buggy source:
/** 
 * Saves the caps mode and the previous word at the start of composing. WordComposer needs to know about the caps mode for several reasons. The first is, we need to know after the fact what the reason was, to register the correct form into the user history dictionary: if the word was automatically capitalized, we should insert it in all-lower case but if it's a manual pressing of shift, then it should be inserted as is. Also, batch input needs to know about the current caps mode to display correctly capitalized suggestions.
 * @param mode the mode at the time of start
 * @param previousWord the previous word as context for suggestions. May be null if none.
 */
public void setCapitalizedModeAndPreviousWordAtStartComposingTime(final int mode,final String previousWord){
  mCapitalizedMode=mode;
  mPreviousWord=previousWord;
}

Fixed version (ground truth):
/** 
 * Saves the caps mode and the previous word at the start of composing. WordComposer needs to know about the caps mode for several reasons. The first is, we need to know after the fact what the reason was, to register the correct form into the user history dictionary: if the word was automatically capitalized, we should insert it in all-lower case but if it's a manual pressing of shift, then it should be inserted as is. Also, batch input needs to know about the current caps mode to display correctly capitalized suggestions.
 * @param mode the mode at the time of start
 * @param previousWord the previous word as context for suggestions. May be null if none.
 */
public void setCapitalizedModeAndPreviousWordAtStartComposingTime(final int mode,final String previousWord){
  mCapitalizedMode=mode;
  mPreviousWordForSuggestion=previousWord;
}
Program: 87463
Project: 87463
Buggy source:
public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord,final String previousWord){
  mPrimaryKeyCodes=lastComposedWord.mPrimaryKeyCodes;
  mInputPointers.set(lastComposedWord.mInputPointers);
  mTypedWord.setLength(0);
  mTypedWord.append(lastComposedWord.mTypedWord);
  refreshSize();
  mCapitalizedMode=lastComposedWord.mCapitalizedMode;
  mAutoCorrection=null;
  mCursorPositionWithinWord=mCodePointSize;
  mRejectedBatchModeSuggestion=null;
  mIsResumed=true;
  mPreviousWord=previousWord;
}

Fixed version (ground truth):
public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord,final String previousWord){
  mPrimaryKeyCodes=lastComposedWord.mPrimaryKeyCodes;
  mInputPointers.set(lastComposedWord.mInputPointers);
  mTypedWord.setLength(0);
  mTypedWord.append(lastComposedWord.mTypedWord);
  refreshSize();
  mCapitalizedMode=lastComposedWord.mCapitalizedMode;
  mAutoCorrection=null;
  mCursorPositionWithinWord=mCodePointSize;
  mRejectedBatchModeSuggestion=null;
  mIsResumed=true;
  mPreviousWordForSuggestion=previousWord;
}
Program: 87464
Project: 87464
Buggy source:
public WordComposer(final WordComposer source){
  mPrimaryKeyCodes=Arrays.copyOf(source.mPrimaryKeyCodes,source.mPrimaryKeyCodes.length);
  mTypedWord=new StringBuilder(source.mTypedWord);
  mInputPointers.copy(source.mInputPointers);
  mCapsCount=source.mCapsCount;
  mDigitsCount=source.mDigitsCount;
  mIsFirstCharCapitalized=source.mIsFirstCharCapitalized;
  mCapitalizedMode=source.mCapitalizedMode;
  mTrailingSingleQuotesCount=source.mTrailingSingleQuotesCount;
  mIsResumed=source.mIsResumed;
  mIsBatchMode=source.mIsBatchMode;
  mCursorPositionWithinWord=source.mCursorPositionWithinWord;
  mRejectedBatchModeSuggestion=source.mRejectedBatchModeSuggestion;
  mPreviousWord=source.mPreviousWord;
  refreshSize();
}

Fixed version (ground truth):
public WordComposer(final WordComposer source){
  mPrimaryKeyCodes=Arrays.copyOf(source.mPrimaryKeyCodes,source.mPrimaryKeyCodes.length);
  mTypedWord=new StringBuilder(source.mTypedWord);
  mInputPointers.copy(source.mInputPointers);
  mCapsCount=source.mCapsCount;
  mDigitsCount=source.mDigitsCount;
  mIsFirstCharCapitalized=source.mIsFirstCharCapitalized;
  mCapitalizedMode=source.mCapitalizedMode;
  mTrailingSingleQuotesCount=source.mTrailingSingleQuotesCount;
  mIsResumed=source.mIsResumed;
  mIsBatchMode=source.mIsBatchMode;
  mCursorPositionWithinWord=source.mCursorPositionWithinWord;
  mRejectedBatchModeSuggestion=source.mRejectedBatchModeSuggestion;
  mPreviousWordForSuggestion=source.mPreviousWordForSuggestion;
  refreshSize();
}
Program: 87465
Project: 87465
Buggy source:
/** 
 * Clear out the keys registered so far.
 */
public void reset(){
  mTypedWord.setLength(0);
  mAutoCorrection=null;
  mCapsCount=0;
  mDigitsCount=0;
  mIsFirstCharCapitalized=false;
  mTrailingSingleQuotesCount=0;
  mIsResumed=false;
  mIsBatchMode=false;
  mCursorPositionWithinWord=0;
  mRejectedBatchModeSuggestion=null;
  mPreviousWord=null;
  refreshSize();
}

Fixed version (ground truth):
/** 
 * Clear out the keys registered so far.
 */
public void reset(){
  mTypedWord.setLength(0);
  mAutoCorrection=null;
  mCapsCount=0;
  mDigitsCount=0;
  mIsFirstCharCapitalized=false;
  mTrailingSingleQuotesCount=0;
  mIsResumed=false;
  mIsBatchMode=false;
  mCursorPositionWithinWord=0;
  mRejectedBatchModeSuggestion=null;
  mPreviousWordForSuggestion=null;
  refreshSize();
}
Program: 87467
Project: 87467
Buggy source:
private boolean maybeDoubleSpacePeriod(){
  final SettingsValues currentSettingsValues=mSettings.getCurrent();
  if (!currentSettingsValues.mUseDoubleSpacePeriod)   return false;
  if (!mHandler.isAcceptingDoubleSpacePeriod())   return false;
  final CharSequence lastThree=mConnection.getTextBeforeCursor(4,0);
  if (null == lastThree)   return false;
  final int length=lastThree.length();
  if (length < 3)   return false;
  if (lastThree.charAt(length - 1) != Constants.CODE_SPACE)   return false;
  if (lastThree.charAt(length - 2) != Constants.CODE_SPACE)   return false;
  final int firstCodePoint=Character.isSurrogatePair(lastThree.charAt(0),lastThree.charAt(1)) ? Character.codePointAt(lastThree,0) : lastThree.charAt(length - 3);
  if (canBeFollowedByDoubleSpacePeriod(firstCodePoint)) {
    mHandler.cancelDoubleSpacePeriodTimer();
    mConnection.deleteSurroundingText(2,0);
    final String textToInsert=new String(new int[]{currentSettingsValues.mSentenceSeparator,Constants.CODE_SPACE},0,2);
    mConnection.commitText(textToInsert,1);
    if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
      ResearchLogger.latinIME_maybeDoubleSpacePeriod(textToInsert,false);
    }
    mWordComposer.doubleSpacePeriod();
    mKeyboardSwitcher.updateShiftState();
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean maybeDoubleSpacePeriod(){
  final SettingsValues currentSettingsValues=mSettings.getCurrent();
  if (!currentSettingsValues.mUseDoubleSpacePeriod)   return false;
  if (!mHandler.isAcceptingDoubleSpacePeriod())   return false;
  final CharSequence lastThree=mConnection.getTextBeforeCursor(4,0);
  if (null == lastThree)   return false;
  final int length=lastThree.length();
  if (length < 3)   return false;
  if (lastThree.charAt(length - 1) != Constants.CODE_SPACE)   return false;
  if (lastThree.charAt(length - 2) != Constants.CODE_SPACE)   return false;
  final int firstCodePoint=Character.isSurrogatePair(lastThree.charAt(0),lastThree.charAt(1)) ? Character.codePointAt(lastThree,0) : lastThree.charAt(length - 3);
  if (canBeFollowedByDoubleSpacePeriod(firstCodePoint)) {
    mHandler.cancelDoubleSpacePeriodTimer();
    mConnection.deleteSurroundingText(2,0);
    final String textToInsert=new String(new int[]{currentSettingsValues.mSentenceSeparator,Constants.CODE_SPACE},0,2);
    mConnection.commitText(textToInsert,1);
    if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
      ResearchLogger.latinIME_maybeDoubleSpacePeriod(textToInsert,false);
    }
    mWordComposer.discardPreviousWordForSuggestion();
    mKeyboardSwitcher.updateShiftState();
    return true;
  }
  return false;
}
Program: 87468
Project: 87468
Buggy source:
/** 
 * Commits the chosen word to the text field and saves it for later retrieval.
 */
private void commitChosenWord(final String chosenWord,final int commitType,final String separatorString){
  final SuggestedWords suggestedWords=mSuggestedWords;
  mConnection.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan(this,chosenWord,suggestedWords,mIsMainDictionaryAvailable),1);
  final String prevWord=addToUserHistoryDictionary(chosenWord);
  mLastComposedWord=mWordComposer.commitWord(commitType,chosenWord,separatorString,prevWord);
}

Fixed version (ground truth):
/** 
 * Commits the chosen word to the text field and saves it for later retrieval.
 */
private void commitChosenWord(final String chosenWord,final int commitType,final String separatorString){
  final SuggestedWords suggestedWords=mSuggestedWords;
  mConnection.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan(this,chosenWord,suggestedWords,mIsMainDictionaryAvailable),1);
  final String prevWord=addToUserHistoryDictionary(chosenWord);
  mLastComposedWord=mWordComposer.commitWord(commitType,chosenWord,separatorString,prevWord);
  final boolean shouldDiscardPreviousWordForSuggestion;
  if (0 == StringUtils.codePointCount(separatorString)) {
    shouldDiscardPreviousWordForSuggestion=mSettings.getCurrent().mCurrentLanguageHasSpaces;
  }
 else {
    shouldDiscardPreviousWordForSuggestion=!StringUtils.containsOnlyWhitespace(separatorString);
  }
  if (shouldDiscardPreviousWordForSuggestion) {
    mWordComposer.discardPreviousWordForSuggestion();
  }
}
Program: 87469
Project: 87469
Buggy source:
private void getSuggestedWords(final int sessionId,final int sequenceNumber,final OnGetSuggestedWordsCallback callback){
  final Keyboard keyboard=mKeyboardSwitcher.getKeyboard();
  final Suggest suggest=mSuggest;
  if (keyboard == null || suggest == null) {
    callback.onGetSuggestedWords(SuggestedWords.EMPTY);
    return;
  }
  final SettingsValues currentSettings=mSettings.getCurrent();
  final int[] additionalFeaturesOptions=currentSettings.mAdditionalFeaturesSettingValues;
  if (DEBUG) {
    if (mWordComposer.isComposingWord() || mWordComposer.isBatchMode()) {
      final String previousWord=mWordComposer.getPreviousWord();
      final String rereadPrevWord=getNthPreviousWordForSuggestion(currentSettings,mWordComposer.isComposingWord() ? 2 : 1);
      if (!TextUtils.equals(previousWord,rereadPrevWord)) {
        throw new RuntimeException("String_Node_Str" + previousWord + "String_Node_Str"+ rereadPrevWord);
      }
    }
  }
  suggest.getSuggestedWords(mWordComposer,mWordComposer.getPreviousWord(),keyboard.getProximityInfo(),currentSettings.mBlockPotentiallyOffensive,currentSettings.mCorrectionEnabled,additionalFeaturesOptions,sessionId,sequenceNumber,callback);
}

Fixed version (ground truth):
private void getSuggestedWords(final int sessionId,final int sequenceNumber,final OnGetSuggestedWordsCallback callback){
  final Keyboard keyboard=mKeyboardSwitcher.getKeyboard();
  final Suggest suggest=mSuggest;
  if (keyboard == null || suggest == null) {
    callback.onGetSuggestedWords(SuggestedWords.EMPTY);
    return;
  }
  final SettingsValues currentSettings=mSettings.getCurrent();
  final int[] additionalFeaturesOptions=currentSettings.mAdditionalFeaturesSettingValues;
  if (DEBUG) {
    if (mWordComposer.isComposingWord() || mWordComposer.isBatchMode()) {
      final String previousWord=mWordComposer.getPreviousWordForSuggestion();
      final String rereadPrevWord=getNthPreviousWordForSuggestion(currentSettings,mWordComposer.isComposingWord() ? 2 : 1);
      if (!TextUtils.equals(previousWord,rereadPrevWord)) {
        throw new RuntimeException("String_Node_Str" + previousWord + "String_Node_Str"+ rereadPrevWord);
      }
    }
  }
  suggest.getSuggestedWords(mWordComposer,mWordComposer.getPreviousWordForSuggestion(),keyboard.getProximityInfo(),currentSettings.mBlockPotentiallyOffensive,currentSettings.mCorrectionEnabled,additionalFeaturesOptions,sessionId,sequenceNumber,callback);
}
Program: 87470
Project: 87470
Buggy source:
/** 
 * Set the currently composing word to the one passed as an argument. This will register NOT_A_COORDINATE for X and Ys, and use the passed keyboard for proximity.
 * @param word the char sequence to set as the composing word.
 * @param previousWord the previous word, to use as context for suggestions. Can be null ifthe context is nil (typically, at start of text).
 * @param keyboard the keyboard this is typed on, for coordinate info/proximity.
 */
public void setComposingWord(final CharSequence word,final String previousWord,final Keyboard keyboard){
  reset();
  final int length=word.length();
  for (int i=0; i < length; i=Character.offsetByCodePoints(word,i,1)) {
    final int codePoint=Character.codePointAt(word,i);
    addKeyInfo(codePoint,keyboard);
  }
  mIsResumed=true;
  mPreviousWord=previousWord;
}

Fixed version (ground truth):
/** 
 * Set the currently composing word to the one passed as an argument. This will register NOT_A_COORDINATE for X and Ys, and use the passed keyboard for proximity.
 * @param word the char sequence to set as the composing word.
 * @param previousWord the previous word, to use as context for suggestions. Can be null ifthe context is nil (typically, at start of text).
 * @param keyboard the keyboard this is typed on, for coordinate info/proximity.
 */
public void setComposingWord(final CharSequence word,final String previousWord,final Keyboard keyboard){
  reset();
  final int length=word.length();
  for (int i=0; i < length; i=Character.offsetByCodePoints(word,i,1)) {
    final int codePoint=Character.codePointAt(word,i);
    addKeyInfo(codePoint,keyboard);
  }
  mIsResumed=true;
  mPreviousWordForSuggestion=previousWord;
}
Program: 87471
Project: 87471
Buggy source:
public LastComposedWord commitWord(final int type,final String committedWord,final String separatorString,final String prevWord){
  final int[] primaryKeyCodes=mPrimaryKeyCodes;
  mPrimaryKeyCodes=new int[MAX_WORD_LENGTH];
  final LastComposedWord lastComposedWord=new LastComposedWord(primaryKeyCodes,mInputPointers,mTypedWord.toString(),committedWord,separatorString,prevWord,mCapitalizedMode);
  mInputPointers.reset();
  if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD && type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {
    lastComposedWord.deactivate();
  }
  mCapsCount=0;
  mDigitsCount=0;
  mIsBatchMode=false;
  final boolean isWhitespace=1 == StringUtils.codePointCount(separatorString) && Character.isWhitespace(separatorString.codePointAt(0));
  mPreviousWord=isWhitespace ? mTypedWord.toString() : null;
  mTypedWord.setLength(0);
  mCodePointSize=0;
  mTrailingSingleQuotesCount=0;
  mIsFirstCharCapitalized=false;
  mCapitalizedMode=CAPS_MODE_OFF;
  refreshSize();
  mAutoCorrection=null;
  mCursorPositionWithinWord=0;
  mIsResumed=false;
  mRejectedBatchModeSuggestion=null;
  return lastComposedWord;
}

Fixed version (ground truth):
public LastComposedWord commitWord(final int type,final String committedWord,final String separatorString,final String prevWord){
  final int[] primaryKeyCodes=mPrimaryKeyCodes;
  mPrimaryKeyCodes=new int[MAX_WORD_LENGTH];
  final LastComposedWord lastComposedWord=new LastComposedWord(primaryKeyCodes,mInputPointers,mTypedWord.toString(),committedWord,separatorString,prevWord,mCapitalizedMode);
  mInputPointers.reset();
  if (type != LastComposedWord.COMMIT_TYPE_DECIDED_WORD && type != LastComposedWord.COMMIT_TYPE_MANUAL_PICK) {
    lastComposedWord.deactivate();
  }
  mCapsCount=0;
  mDigitsCount=0;
  mIsBatchMode=false;
  mPreviousWordForSuggestion=mTypedWord.toString();
  mTypedWord.setLength(0);
  mCodePointSize=0;
  mTrailingSingleQuotesCount=0;
  mIsFirstCharCapitalized=false;
  mCapitalizedMode=CAPS_MODE_OFF;
  refreshSize();
  mAutoCorrection=null;
  mCursorPositionWithinWord=0;
  mIsResumed=false;
  mRejectedBatchModeSuggestion=null;
  return lastComposedWord;
}
Program: 87472
Project: 87472
Buggy source:
/** 
 * Saves the caps mode and the previous word at the start of composing. WordComposer needs to know about the caps mode for several reasons. The first is, we need to know after the fact what the reason was, to register the correct form into the user history dictionary: if the word was automatically capitalized, we should insert it in all-lower case but if it's a manual pressing of shift, then it should be inserted as is. Also, batch input needs to know about the current caps mode to display correctly capitalized suggestions.
 * @param mode the mode at the time of start
 * @param previousWord the previous word as context for suggestions. May be null if none.
 */
public void setCapitalizedModeAndPreviousWordAtStartComposingTime(final int mode,final String previousWord){
  mCapitalizedMode=mode;
  mPreviousWord=previousWord;
}

Fixed version (ground truth):
/** 
 * Saves the caps mode and the previous word at the start of composing. WordComposer needs to know about the caps mode for several reasons. The first is, we need to know after the fact what the reason was, to register the correct form into the user history dictionary: if the word was automatically capitalized, we should insert it in all-lower case but if it's a manual pressing of shift, then it should be inserted as is. Also, batch input needs to know about the current caps mode to display correctly capitalized suggestions.
 * @param mode the mode at the time of start
 * @param previousWord the previous word as context for suggestions. May be null if none.
 */
public void setCapitalizedModeAndPreviousWordAtStartComposingTime(final int mode,final String previousWord){
  mCapitalizedMode=mode;
  mPreviousWordForSuggestion=previousWord;
}
Program: 87473
Project: 87473
Buggy source:
public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord,final String previousWord){
  mPrimaryKeyCodes=lastComposedWord.mPrimaryKeyCodes;
  mInputPointers.set(lastComposedWord.mInputPointers);
  mTypedWord.setLength(0);
  mTypedWord.append(lastComposedWord.mTypedWord);
  refreshSize();
  mCapitalizedMode=lastComposedWord.mCapitalizedMode;
  mAutoCorrection=null;
  mCursorPositionWithinWord=mCodePointSize;
  mRejectedBatchModeSuggestion=null;
  mIsResumed=true;
  mPreviousWord=previousWord;
}

Fixed version (ground truth):
public void resumeSuggestionOnLastComposedWord(final LastComposedWord lastComposedWord,final String previousWord){
  mPrimaryKeyCodes=lastComposedWord.mPrimaryKeyCodes;
  mInputPointers.set(lastComposedWord.mInputPointers);
  mTypedWord.setLength(0);
  mTypedWord.append(lastComposedWord.mTypedWord);
  refreshSize();
  mCapitalizedMode=lastComposedWord.mCapitalizedMode;
  mAutoCorrection=null;
  mCursorPositionWithinWord=mCodePointSize;
  mRejectedBatchModeSuggestion=null;
  mIsResumed=true;
  mPreviousWordForSuggestion=previousWord;
}
Program: 87474
Project: 87474
Buggy source:
public WordComposer(final WordComposer source){
  mPrimaryKeyCodes=Arrays.copyOf(source.mPrimaryKeyCodes,source.mPrimaryKeyCodes.length);
  mTypedWord=new StringBuilder(source.mTypedWord);
  mInputPointers.copy(source.mInputPointers);
  mCapsCount=source.mCapsCount;
  mDigitsCount=source.mDigitsCount;
  mIsFirstCharCapitalized=source.mIsFirstCharCapitalized;
  mCapitalizedMode=source.mCapitalizedMode;
  mTrailingSingleQuotesCount=source.mTrailingSingleQuotesCount;
  mIsResumed=source.mIsResumed;
  mIsBatchMode=source.mIsBatchMode;
  mCursorPositionWithinWord=source.mCursorPositionWithinWord;
  mRejectedBatchModeSuggestion=source.mRejectedBatchModeSuggestion;
  mPreviousWord=source.mPreviousWord;
  refreshSize();
}

Fixed version (ground truth):
public WordComposer(final WordComposer source){
  mPrimaryKeyCodes=Arrays.copyOf(source.mPrimaryKeyCodes,source.mPrimaryKeyCodes.length);
  mTypedWord=new StringBuilder(source.mTypedWord);
  mInputPointers.copy(source.mInputPointers);
  mCapsCount=source.mCapsCount;
  mDigitsCount=source.mDigitsCount;
  mIsFirstCharCapitalized=source.mIsFirstCharCapitalized;
  mCapitalizedMode=source.mCapitalizedMode;
  mTrailingSingleQuotesCount=source.mTrailingSingleQuotesCount;
  mIsResumed=source.mIsResumed;
  mIsBatchMode=source.mIsBatchMode;
  mCursorPositionWithinWord=source.mCursorPositionWithinWord;
  mRejectedBatchModeSuggestion=source.mRejectedBatchModeSuggestion;
  mPreviousWordForSuggestion=source.mPreviousWordForSuggestion;
  refreshSize();
}
Program: 87475
Project: 87475
Buggy source:
/** 
 * Clear out the keys registered so far.
 */
public void reset(){
  mTypedWord.setLength(0);
  mAutoCorrection=null;
  mCapsCount=0;
  mDigitsCount=0;
  mIsFirstCharCapitalized=false;
  mTrailingSingleQuotesCount=0;
  mIsResumed=false;
  mIsBatchMode=false;
  mCursorPositionWithinWord=0;
  mRejectedBatchModeSuggestion=null;
  mPreviousWord=null;
  refreshSize();
}

Fixed version (ground truth):
/** 
 * Clear out the keys registered so far.
 */
public void reset(){
  mTypedWord.setLength(0);
  mAutoCorrection=null;
  mCapsCount=0;
  mDigitsCount=0;
  mIsFirstCharCapitalized=false;
  mTrailingSingleQuotesCount=0;
  mIsResumed=false;
  mIsBatchMode=false;
  mCursorPositionWithinWord=0;
  mRejectedBatchModeSuggestion=null;
  mPreviousWordForSuggestion=null;
  refreshSize();
}
Program: 87477
Project: 87477
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87478
Project: 87478
Buggy source:
private void setSymbolsKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=false;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}

Fixed version (ground truth):
private void setSymbolsKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=false;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}
Program: 87479
Project: 87479
Buggy source:
private void setSymbolsShiftedKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsShiftedKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=true;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}

Fixed version (ground truth):
private void setSymbolsShiftedKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsShiftedKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=true;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}
Program: 87480
Project: 87480
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87481
Project: 87481
Buggy source:
private void setSymbolsKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=false;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}

Fixed version (ground truth):
private void setSymbolsKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=false;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}
Program: 87482
Project: 87482
Buggy source:
private void setSymbolsShiftedKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsShiftedKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=true;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}

Fixed version (ground truth):
private void setSymbolsShiftedKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mSwitchActions.setSymbolsShiftedKeyboard();
  mIsAlphabetMode=false;
  mIsSymbolShifted=true;
  mRecapitalizeMode=RecapitalizeStatus.NOT_A_RECAPITALIZE_MODE;
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchState=SWITCH_STATE_SYMBOL_BEGIN;
}
Program: 87483
Project: 87483
Buggy source:
@Override public void setPosition(int position){
  if (mTrieBuf == null || position < 0 || position > -mTrieBuf.length)   return;
  mTriePos=position;
}

Fixed version (ground truth):
@Override public void setPosition(int position){
  if (mTrieBuf == null || position < 0 || position > mTrieBuf.length)   return;
  mTriePos=position;
}
Program: 87484
Project: 87484
Buggy source:
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,wordInfo.mAutoCommitFirstWordConfidence);
}
Program: 87485
Project: 87485
Buggy source:
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  return Suggest.getTransformedSuggestedWordInfo(createWordInfo(info),Locale.ENGLISH,false,false,trailingSingleQuotesCount);
}

Fixed version (ground truth):
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  final SuggestedWordInfo suggestedWordInfo=createWordInfo(info);
  final SuggestedWordInfo returnedWordInfo=Suggest.getTransformedSuggestedWordInfo(suggestedWordInfo,Locale.ENGLISH,false,false,trailingSingleQuotesCount);
  assertEquals(suggestedWordInfo.mAutoCommitFirstWordConfidence,returnedWordInfo.mAutoCommitFirstWordConfidence);
  return returnedWordInfo;
}
Program: 87486
Project: 87486
Buggy source:
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,new Random().nextInt(1000000));
}
Program: 87487
Project: 87487
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87488
Project: 87488
Buggy source:
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,wordInfo.mAutoCommitFirstWordConfidence);
}
Program: 87489
Project: 87489
Buggy source:
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  return Suggest.getTransformedSuggestedWordInfo(createWordInfo(info),Locale.ENGLISH,false,false,trailingSingleQuotesCount);
}

Fixed version (ground truth):
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  final SuggestedWordInfo suggestedWordInfo=createWordInfo(info);
  final SuggestedWordInfo returnedWordInfo=Suggest.getTransformedSuggestedWordInfo(suggestedWordInfo,Locale.ENGLISH,false,false,trailingSingleQuotesCount);
  assertEquals(suggestedWordInfo.mAutoCommitFirstWordConfidence,returnedWordInfo.mAutoCommitFirstWordConfidence);
  return returnedWordInfo;
}
Program: 87490
Project: 87490
Buggy source:
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,new Random().nextInt(1000000));
}
Program: 87491
Project: 87491
Buggy source:
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,wordInfo.mAutoCommitFirstWordConfidence);
}
Program: 87492
Project: 87492
Buggy source:
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  return Suggest.getTransformedSuggestedWordInfo(createWordInfo(info),Locale.ENGLISH,false,false,trailingSingleQuotesCount);
}

Fixed version (ground truth):
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  final SuggestedWordInfo suggestedWordInfo=createWordInfo(info);
  final SuggestedWordInfo returnedWordInfo=Suggest.getTransformedSuggestedWordInfo(suggestedWordInfo,Locale.ENGLISH,false,false,trailingSingleQuotesCount);
  assertEquals(suggestedWordInfo.mAutoCommitFirstWordConfidence,returnedWordInfo.mAutoCommitFirstWordConfidence);
  return returnedWordInfo;
}
Program: 87493
Project: 87493
Buggy source:
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,new Random().nextInt(1000000));
}
Program: 87494
Project: 87494
Buggy source:
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,wordInfo.mAutoCommitFirstWordConfidence);
}
Program: 87495
Project: 87495
Buggy source:
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  return Suggest.getTransformedSuggestedWordInfo(createWordInfo(info),Locale.ENGLISH,false,false,trailingSingleQuotesCount);
}

Fixed version (ground truth):
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  final SuggestedWordInfo suggestedWordInfo=createWordInfo(info);
  final SuggestedWordInfo returnedWordInfo=Suggest.getTransformedSuggestedWordInfo(suggestedWordInfo,Locale.ENGLISH,false,false,trailingSingleQuotesCount);
  assertEquals(suggestedWordInfo.mAutoCommitFirstWordConfidence,returnedWordInfo.mAutoCommitFirstWordConfidence);
  return returnedWordInfo;
}
Program: 87496
Project: 87496
Buggy source:
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,new Random().nextInt(1000000));
}
Program: 87497
Project: 87497
Buggy source:
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
static SuggestedWordInfo getTransformedSuggestedWordInfo(final SuggestedWordInfo wordInfo,final Locale locale,final boolean isAllUpperCase,final boolean isFirstCharCapitalized,final int trailingSingleQuotesCount){
  final StringBuilder sb=new StringBuilder(wordInfo.mWord.length());
  if (isAllUpperCase) {
    sb.append(wordInfo.mWord.toUpperCase(locale));
  }
 else   if (isFirstCharCapitalized) {
    sb.append(StringUtils.capitalizeFirstCodePoint(wordInfo.mWord,locale));
  }
 else {
    sb.append(wordInfo.mWord);
  }
  final int quotesToAppend=trailingSingleQuotesCount - (-1 == wordInfo.mWord.indexOf(Constants.CODE_SINGLE_QUOTE) ? 0 : 1);
  for (int i=quotesToAppend - 1; i >= 0; --i) {
    sb.appendCodePoint(Constants.CODE_SINGLE_QUOTE);
  }
  return new SuggestedWordInfo(sb.toString(),wordInfo.mScore,wordInfo.mKind,wordInfo.mSourceDict,wordInfo.mIndexOfTouchPointOfSecondWord,wordInfo.mAutoCommitFirstWordConfidence);
}
Program: 87498
Project: 87498
Buggy source:
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  return Suggest.getTransformedSuggestedWordInfo(createWordInfo(info),Locale.ENGLISH,false,false,trailingSingleQuotesCount);
}

Fixed version (ground truth):
private SuggestedWordInfo transformWordInfo(final String info,final int trailingSingleQuotesCount){
  final SuggestedWordInfo suggestedWordInfo=createWordInfo(info);
  final SuggestedWordInfo returnedWordInfo=Suggest.getTransformedSuggestedWordInfo(suggestedWordInfo,Locale.ENGLISH,false,false,trailingSingleQuotesCount);
  assertEquals(suggestedWordInfo.mAutoCommitFirstWordConfidence,returnedWordInfo.mAutoCommitFirstWordConfidence);
  return returnedWordInfo;
}
Program: 87499
Project: 87499
Buggy source:
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,SuggestedWordInfo.NOT_A_CONFIDENCE);
}

Fixed version (ground truth):
private SuggestedWordInfo createWordInfo(final String s){
  return new SuggestedWordInfo(s,100,SuggestedWordInfo.KIND_TYPED,null,SuggestedWordInfo.NOT_AN_INDEX,new Random().nextInt(1000000));
}
Program: 87500
Project: 87500
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87501
Project: 87501
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87502
Project: 87502
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87503
Project: 87503
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87504
Project: 87504
Buggy source:
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mSwitchActions.setEmojiKeyboard();
}

Fixed version (ground truth):
private void setEmojiKeyboard(){
  if (DEBUG_ACTION) {
    Log.d(TAG,"String_Node_Str");
  }
  mIsAlphabetMode=false;
  mIsEmojiMode=true;
  mPrevMainKeyboardWasShiftLocked=mAlphabetShiftState.isShiftLocked();
  mAlphabetShiftState.setShiftLocked(false);
  mSwitchActions.setEmojiKeyboard();
}
Program: 87505
Project: 87505
Buggy source:
public boolean isShowingMoreKeysPanel(){
  if (isShowingEmojiKeyboard()) {
    return false;
  }
  return mKeyboardView.isShowingMoreKeysPanel();
}

Fixed version (ground truth):
public boolean isShowingMoreKeysPanel(){
  if (isShowingEmojiPalettes()) {
    return false;
  }
  return mKeyboardView.isShowingMoreKeysPanel();
}
Program: 87506
Project: 87506
Buggy source:
public void saveKeyboardState(){
  if (getKeyboard() != null || isShowingEmojiKeyboard()) {
    mState.onSaveKeyboardState();
  }
}

Fixed version (ground truth):
public void saveKeyboardState(){
  if (getKeyboard() != null || isShowingEmojiPalettes()) {
    mState.onSaveKeyboardState();
  }
}
Program: 87507
Project: 87507
Buggy source:
public View getVisibleKeyboardView(){
  if (isShowingEmojiKeyboard()) {
    return mEmojiPalettesView;
  }
  return mKeyboardView;
}

Fixed version (ground truth):
public View getVisibleKeyboardView(){
  if (isShowingEmojiPalettes()) {
    return mEmojiPalettesView;
  }
  return mKeyboardView;
}