Program: 157578
Project: 157578
Buggy source:
@Override public void onStartInput(EditorInfo attribute,boolean restarting){
  if (DEBUG)   Log.d("String_Node_Str","String_Node_Str" + attribute.imeOptions + "String_Node_Str"+ attribute.inputType+ "String_Node_Str"+ restarting+ "String_Node_Str");
  super.onStartInput(attribute,restarting);
  mKeyboardSwitcher.makeKeyboards(false);
  resetComposing();
  TextEntryState.newSession(this);
  if (!restarting) {
    mMetaState=0;
  }
  mPredictionOn=false;
  mCompletionOn=false;
  mCompletions=null;
  mCapsLock=false;
switch (attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {
case EditorInfo.TYPE_CLASS_NUMBER:
case EditorInfo.TYPE_CLASS_DATETIME:
case EditorInfo.TYPE_CLASS_PHONE:
    mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE,attribute);
  break;
case EditorInfo.TYPE_CLASS_TEXT:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,attribute);
mPredictionOn=true;
final int variation=attribute.inputType & EditorInfo.TYPE_MASK_VARIATION;
if (variation == EditorInfo.TYPE_TEXT_VARIATION_PASSWORD || variation == EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {
mPredictionOn=false;
}
if ((!AnySoftKeyboardConfiguration.getInstance().getInsertSpaceAfterCandidatePick()) || variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS || variation == EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME) {
mAutoSpace=false;
}
 else {
mAutoSpace=true;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) {
mPredictionOn=false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_EMAIL,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_URI) {
mPredictionOn=false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_URL,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_IM,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_FILTER) {
mPredictionOn=false;
}
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn=false;
mCompletionOn=true && isFullscreenMode();
}
updateShiftKeyState(attribute);
break;
default :
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,attribute);
updateShiftKeyState(attribute);
}
mComposing.setLength(0);
mPredicting=false;
setCandidatesViewShown(false);
if (mSuggest != null) {
mSuggest.setCorrectionMode(mCorrectionMode);
}
mPredictionOn=mPredictionOn && mCorrectionMode > 0;
if (mCandidateView != null) mCandidateView.setSuggestions(null,false,false,false);
if (TRACE_SDCARD) Debug.startMethodTracing("String_Node_Str");
}

Fixed version (ground truth):
@Override public void onStartInput(EditorInfo attribute,boolean restarting){
  if (DEBUG)   Log.d(TAG,"String_Node_Str" + attribute.imeOptions + "String_Node_Str"+ attribute.inputType+ "String_Node_Str"+ restarting+ "String_Node_Str");
  super.onStartInput(attribute,restarting);
  mKeyboardSwitcher.makeKeyboards(false);
  resetComposing();
  TextEntryState.newSession(this);
  if (!restarting) {
    mMetaState=0;
  }
  mPredictionOn=false;
  mCompletionOn=false;
  mCompletions=null;
  mCapsLock=false;
switch (attribute.inputType & EditorInfo.TYPE_MASK_CLASS) {
case EditorInfo.TYPE_CLASS_NUMBER:
case EditorInfo.TYPE_CLASS_DATETIME:
case EditorInfo.TYPE_CLASS_PHONE:
    mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_PHONE,attribute);
  break;
case EditorInfo.TYPE_CLASS_TEXT:
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,attribute);
mPredictionOn=true;
final int variation=attribute.inputType & EditorInfo.TYPE_MASK_VARIATION;
if (variation == EditorInfo.TYPE_TEXT_VARIATION_PASSWORD || variation == EditorInfo.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {
mPredictionOn=false;
}
if ((!AnySoftKeyboardConfiguration.getInstance().getInsertSpaceAfterCandidatePick()) || variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS || variation == EditorInfo.TYPE_TEXT_VARIATION_PERSON_NAME) {
mAutoSpace=false;
}
 else {
mAutoSpace=true;
}
if (variation == EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS) {
mPredictionOn=false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_EMAIL,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_URI) {
mPredictionOn=false;
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_URL,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_SHORT_MESSAGE) {
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_IM,attribute);
}
 else if (variation == EditorInfo.TYPE_TEXT_VARIATION_FILTER) {
mPredictionOn=false;
}
if ((attribute.inputType & EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn=false;
mCompletionOn=true && isFullscreenMode();
}
updateShiftKeyState(attribute);
break;
default :
mKeyboardSwitcher.setKeyboardMode(KeyboardSwitcher.MODE_TEXT,attribute);
updateShiftKeyState(attribute);
}
mComposing.setLength(0);
mPredicting=false;
setCandidatesViewShown(false);
if (mSuggest != null) {
mSuggest.setCorrectionMode(mCorrectionMode);
}
mPredictionOn=mPredictionOn && mCorrectionMode > 0;
if (mCandidateView != null) mCandidateView.setSuggestions(null,false,false,false);
if (TRACE_SDCARD) Debug.startMethodTracing("String_Node_Str");
}